SSD201 2515 SPI转CAN设备树怎么修改,有demo吗?

请先 登录 后评论

1 个回答

BBelephant

spi: spi {

            compatible = "sstar_spi";

            io_phy_addr = <0x1f000000>;

            banks = <0x1110>,<0x1111>,<0x1038>,<0x101E>,<0x100B>;

            clocks = <&CLK_mspi0>;

            interrupts = <GIC_SPI INT_IRQ_MSPI_0 IRQ_TYPE_LEVEL_HIGH>;

            /*

             * padmux:

             * mode=1: PAD_PM_SD_CDZ,PAD_SD_D1,PAD_SD_D0,PAD_SD_CLK,PAD_SD_CMD

             * mode=2: PAD_TTL16,PAD_TTL17,PAD_TTL18,PAD_TTL19

             * mode=3: PAD_GPIO4,PAD_GPIO5,PAD_GPIO6,PAD_GPIO7

             * mode=4: PAD_FUART_RX,PAD_FUART_TX,PAD_FUART_CTS,PAD_FUART_RTS

             * mode=5: PAD_GPIO8,PAD_GPIO9,PAD_GPIO10,PAD_GPIO11

             * mode=6: PAD_GPIO0,PAD_GPIO1,PAD_GPIO2,PAD_GPIO3

             */

            //dma = <1>;

            spi0_mode = <5>;

            status = "ok";

 

            mcp2515can: can@0 {

                compatible = "microchip,mcp25625";

                pinctrl-names = "default";

                reg = <1>;

                clocks = <&CLK_xtali_16m>;

                spi-max-frequency = <10000000>;

                interrupts-extended = <&ms_gpi_intc INT_GPI_FIQ_GPIO12>;

                status = "ok";

            };

        };

请先 登录 后评论