找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2051|回复: 9

我想把编译SPI的openWET改成NAND,需要怎么修改?有人愿意教一下我吗

[复制链接]
发表于 2019-9-16 09:43 | 显示全部楼层 |阅读模式
悬赏10恩山币已解决
本帖最后由 king0774 于 2019-9-17 08:04 编辑

我想把编译SPI的openWET改成NAND的,需要怎么修改?有人愿意教一下我吗?下面是DTS,我把红色的部分用蓝色的来替换掉,编译出错



/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/

#include "qcom-ipq4019.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/soc/qcom,tcsr.h>

/ {
        model = "GL.iNet GL-B1300";
        compatible = "glinet,gl-b1300", "qcom,ipq4019";

        aliases {
                led-boot = &power;
                led-failsafe = &power;
                led-running = &power;
                led-upgrade = &power;
        };

        memory {
                device_type = "memory";
                reg = <0x80000000 0x10000000>;
        };

        soc {
                mdio@90000 {
                        status = "okay";
                };

                ess-psgmii@98000 {
                        status = "okay";
                };

                tcsr@1949000 {
                        compatible = "qcom,tcsr";
                        reg = <0x1949000 0x100>;
                        qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
                };

                tcsr@194b000 {
                        /* select hostmode */
                        compatible = "qcom,tcsr";
                        reg = <0x194b000 0x100>;
                        qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
                        status = "okay";
                };

                ess_tcsr@1953000 {
                        compatible = "qcom,tcsr";
                        reg = <0x1953000 0x1000>;
                        qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
                };

                tcsr@1957000 {
                        compatible = "qcom,tcsr";
                        reg = <0x1957000 0x100>;
                        qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
                };

                usb2@60f8800 {
                        status = "okay";
                };

                serial@78af000 {
                        pinctrl-0 = <&serial_pins>;
                        pinctrl-names = "default";
                        status = "okay";
                };

                usb3@8af8800 {
                        status = "okay";
                };

                crypto@8e3a000 {
                        status = "okay";
                };

                watchdog@b017000 {
                        status = "okay";
                };

                ess-switch@c000000 {
                        status = "okay";
                        switch_lan_bmp = <0x18>;
                        switch_wan_bmp = <0x20>;
                };

                edma@c080000 {
                        status = "okay";
                };
        };

        gpio-keys {
                compatible = "gpio-keys";

                wps {
                        label = "wps";
                        gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_WPS_BUTTON>;
                };

                reset {
                        label = "reset";
                        gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
        };

        gpio-leds {
                compatible = "gpio-leds";

                power: power {
                        label = "gl-b1300:green:power";
                        gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };

                mesh {
                        label = "gl-b1300:green:mesh";
                        gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
                };

                wlan {
                        label = "gl-b1300:green:wlan";
                        gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
                };
        };
};

&blsp_dma {
        status = "okay";
};

&cryptobam {
        status = "okay";
};

&blsp1_spi1 {
        pinctrl-0 = <&spi_0_pins>;
        pinctrl-names = "default";
        status = "okay";
        cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;


        mx25l25635f@0 {
                compatible = "jedec,spi-nor";
                #address-cells = <1>;
                #size-cells = <1>;
                reg = <0>;
                spi-max-frequency = <24000000>;
&nand {
        pinctrl-0 = <&nand_pins>;
        pinctrl-names = "default";
        status = "okay";


        nand@0 {
                partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;

                SBL1@0 {
                        label = "SBL1";
                        reg = <0x0 0x40000>;
                        read-only;
                };

                MIBIB@40000 {
                        label = "MIBIB";
                        reg = <0x40000 0x20000>;
                        read-only;
                };

                QSEE@60000 {
                        label = "QSEE";
                        reg = <0x60000 0x60000>;
                        read-only;
                };

                CDT@c0000 {
                        label = "CDT";
                        reg = <0xc0000 0x10000>;
                        read-only;
                };

                DDRPARAMS@d0000 {
                        label = "DDRPARAMS";
                        reg = <0xd0000 0x10000>;
                        read-only;
                };

                APPSBLENV@e0000 {
                        label = "APPSBLENV";
                        reg = <0xe0000 0x10000>;
                        read-only;
                };

                APPSBL@f0000 {
                        label = "APPSBL";
                        reg = <0xf0000 0x80000>;
                        read-only;
                };

                ART@170000 {
                        label = "ART";
                        reg = <0x170000 0x10000>;
                        read-only;
                };

                firmware@180000 {
                        label = "firmware";
                        reg = <0x180000 0x1e80000>;
                };
        };
};

&tlmm {
       serial_pins: serial_pinmux {
                mux {
                        pins = "gpio60", "gpio61";
                        function = "blsp_uart0";
                        bias-disable;
                };
        };

        spi_0_pins: spi_0_pinmux {
                pinmux {
                        function = "blsp_spi0";
                        pins = "gpio55", "gpio56", "gpio57";
                };
                pinmux_cs {
                        function = "gpio";
                        pins = "gpio54";
                };
                pinconf {
                        pins = "gpio55", "gpio56", "gpio57";
                        drive-strength = <12>;
                        bias-disable;
                };
                pinconf_cs {
                        pins = "gpio54";
                        drive-strength = <2>;
                        bias-disable;
                        output-high;
        serial_0_pins: serial_pinmux {
                mux {
                        pins = "gpio16", "gpio17";
                        function = "blsp_uart0";
                        bias-disable;
                };
        };

        serial_1_pins: serial1_pinmux {
                mux {
                        /* We use the i2c-0 pins for serial_1 */
                        pins = "gpio8", "gpio9";
                        function = "blsp_uart1";
                        bias-disable;
                };
        };



        nand_pins: nand_pins {



               pullups {
                        pins = "gpio52", "gpio53", "gpio58",
                                "gpio59";
                        function = "qpic";
                        bias-pull-up;
                };


                pulldowns {
                        pins = "gpio54", "gpio55", "gpio56",
                                "gpio57", "gpio60", "gpio61",
                                "gpio62", "gpio63", "gpio64",
                                "gpio65", "gpio66", "gpio67",
                                "gpio68", "gpio69";
                        function = "qpic";
                        bias-pull-down;




                };
        };
};

&gmac0 {
        vlan_tag = <1 0x39>;
};

&usb2_hs_phy {
        status = "okay";
};

&usb3_hs_phy {
        status = "okay";
};

&usb3_ss_phy {
        status = "okay";
};

&wifi0 {
        status = "okay";
        qcom,ath10k-calibration-variant = "GL-B1300";
};

&wifi1 {
        status = "okay";
        qcom,ath10k-calibration-variant = "GL-B1300";
};


附件: 您需要 登录 才可以下载或查看,没有账号?立即注册

最佳答案

查看完整内容

第157行 的括号没有闭合
我的恩山、我的无线 The best wifi forum is right here.
发表于 2019-9-16 09:43 | 显示全部楼层
king0774 发表于 2019-9-18 08:09
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
*
* Permission to use, c ...

第157行
  1. partitions {
复制代码
的括号没有闭合

评分

参与人数 1恩山币 +1 收起 理由
king0774 + 1 真是少了括号了,感谢

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-9-16 10:50 | 显示全部楼层
提示是217行出错,就是&tlmm那里我小白不知道怎么改了,就大神帮忙
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-9-16 12:00 来自手机 | 显示全部楼层
tlmm 部分除了 nand 之外别改

点评

TLMM就改了一行也是不行  详情 回复 发表于 2019-9-17 08:05
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-9-17 08:05 | 显示全部楼层
LGA1150 发表于 2019-9-16 12:00
tlmm 部分除了 nand 之外别改

TLMM就改了一行也是不行
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-9-17 13:05 来自手机 | 显示全部楼层
你改好的 dts 是什么样的,有没有漏掉分号或大括号?

点评

改成上面那样,把红色换了蓝色的  详情 回复 发表于 2019-9-17 16:57
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-9-17 16:57 | 显示全部楼层
LGA1150 发表于 2019-9-17 13:05
你改好的 dts 是什么样的,有没有漏掉分号或大括号?

改成上面那样,把红色换了蓝色的

点评

直接上传上来  详情 回复 发表于 2019-9-17 17:53
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-9-17 17:53 来自手机 | 显示全部楼层
king0774 发表于 2019-9-17 16:57
改成上面那样,把红色换了蓝色的

直接上传上来

点评

[attachimg]309299[/attachimg] /* Copyright (c) 2015, The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or  详情 回复 发表于 2019-9-18 08:09
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-9-18 08:09 | 显示全部楼层



/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/

#include "qcom-ipq4019.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/soc/qcom,tcsr.h>

/ {
        model = "GL.iNet GL-B1300";
        compatible = "glinet,gl-b1300", "qcom,ipq4019";

        aliases {
                led-boot = &power;
                led-failsafe = &power;
                led-running = &power;
                led-upgrade = &power;
        };

        memory {
                device_type = "memory";
                reg = <0x80000000 0x10000000>;
        };

        soc {
                mdio@90000 {
                        status = "okay";
                };

                ess-psgmii@98000 {
                        status = "okay";
                };

                tcsr@1949000 {
                        compatible = "qcom,tcsr";
                        reg = <0x1949000 0x100>;
                        qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
                };

                tcsr@194b000 {
                        /* select hostmode */
                        compatible = "qcom,tcsr";
                        reg = <0x194b000 0x100>;
                        qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
                        status = "okay";
                };

                ess_tcsr@1953000 {
                        compatible = "qcom,tcsr";
                        reg = <0x1953000 0x1000>;
                        qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
                };

                tcsr@1957000 {
                        compatible = "qcom,tcsr";
                        reg = <0x1957000 0x100>;
                        qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
                };

                usb2@60f8800 {
                        status = "okay";
                };

                serial@78af000 {
                        pinctrl-0 = <&serial_pins>;
                        pinctrl-names = "default";
                        status = "okay";
                };

                usb3@8af8800 {
                        status = "okay";
                };

                crypto@8e3a000 {
                        status = "okay";
                };

                watchdog@b017000 {
                        status = "okay";
                };

                ess-switch@c000000 {
                        status = "okay";
                        switch_lan_bmp = <0x18>;
                        switch_wan_bmp = <0x20>;
                };

                edma@c080000 {
                        status = "okay";
                };
        };

        gpio-keys {
                compatible = "gpio-keys";

                wps {
                        label = "wps";
                        gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_WPS_BUTTON>;
                };

                reset {
                        label = "reset";
                        gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
        };

        gpio-leds {
                compatible = "gpio-leds";

                power: power {
                        label = "gl-b1300:green:power";
                        gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };

                mesh {
                        label = "gl-b1300:green:mesh";
                        gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
                };

                wlan {
                        label = "gl-b1300:green:wlan";
                        gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
                };
        };
};

&blsp_dma {
        status = "okay";
};

&cryptobam {
        status = "okay";
};

&nand {
        pinctrl-0 = <&nand_pins>;
        pinctrl-names = "default";
        status = "okay";

        nand@0 {
                partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;


                SBL1@0 {
                        label = "SBL1";
                        reg = <0x0 0x40000>;
                        read-only;
                };

                MIBIB@40000 {
                        label = "MIBIB";
                        reg = <0x40000 0x20000>;
                        read-only;
                };

                QSEE@60000 {
                        label = "QSEE";
                        reg = <0x60000 0x60000>;
                        read-only;
                };

                CDT@c0000 {
                        label = "CDT";
                        reg = <0xc0000 0x10000>;
                        read-only;
                };

                DDRPARAMS@d0000 {
                        label = "DDRPARAMS";
                        reg = <0xd0000 0x10000>;
                        read-only;
                };

                APPSBLENV@e0000 {
                        label = "APPSBLENV";
                        reg = <0xe0000 0x10000>;
                        read-only;
                };

                APPSBL@f0000 {
                        label = "APPSBL";
                        reg = <0xf0000 0x80000>;
                        read-only;
                };

                ART@170000 {
                        label = "ART";
                        reg = <0x170000 0x10000>;
                        read-only;
                };

                firmware@180000 {
                        label = "firmware";
                        reg = <0x180000 0x1e80000>;
                };
        };
};

&tlmm {
        serial_pins: serial_pinmux {
                mux {
                        pins = "gpio60", "gpio61";
                        function = "blsp_uart0";
                        bias-disable;
                };
        };

        nand_pins: nand_pins {
                pinmux {
                        function = "blsp_spi0";
                        pins = "gpio55", "gpio56", "gpio57";
                };
                pinmux_cs {
                        function = "gpio";
                        pins = "gpio54";
                };
                pinconf {
                        pins = "gpio55", "gpio56", "gpio57";
                        drive-strength = <12>;
                        bias-disable;
                };
                pinconf_cs {
                        pins = "gpio54";
                        drive-strength = <2>;
                        bias-disable;
                        output-high;
                };
        };
};

&gmac0 {
        vlan_tag = <1 0x39>;
};

&usb2_hs_phy {
        status = "okay";
};

&usb3_hs_phy {
        status = "okay";
};

&usb3_ss_phy {
        status = "okay";
};

&wifi0 {
        status = "okay";
        qcom,ath10k-calibration-variant = "GL-B1300";
};

&wifi1 {
        status = "okay";
        qcom,ath10k-calibration-variant = "GL-B1300";
};

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

点评

真是少了括号了,感谢  详情 回复 发表于 2019-9-20 10:05
第157行 的括号没有闭合  详情 回复 发表于 2019-9-20 01:44
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-9-20 10:05 | 显示全部楼层
king0774 发表于 2019-9-18 08:09
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
*
* Permission to use, c ...

真是少了括号了,感谢
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-28 20:27

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表