#22191: MT7620a DTS refers to invalid pin group/function 'spi_cs1'
--------------------------+------------------------
 Reporter:  yarshevich@…  |      Owner:  developers
     Type:  defect        |     Status:  new
 Priority:  normal        |  Milestone:
Component:  kernel        |    Version:  Trunk
 Keywords:  SPI           |
--------------------------+------------------------
 In file '''./target/linux/ramips/dts/mt7620a.dtsi''' there is a reference
 to '''spi_cs1''' pin group/function:

 {{{
         pinctrl {
                 ...

                 spi_cs1: spi1 {
                         spi1 {
                                 ralink,group = "spi_cs1";
                                 ralink,function = "spi_cs1";
                         };
                 };

                 ...
         }
 }}}

 This '''spi_cs1''' group/function is not supported as per '''./build_dir
 /target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-
 ramips_mt7620/linux-4.4.6/arch/mips/ralink/mt7620.c''':


 {{{
 static struct rt2880_pmx_group mt7620a_pinmux_data[] = {
         GRP("i2c", i2c_grp, 1, MT7620_GPIO_MODE_I2C),
         GRP("uartf", uartf_grp, MT7620_GPIO_MODE_UART0_MASK,
                 MT7620_GPIO_MODE_UART0_SHIFT),
         GRP("spi", spi_grp, 1, MT7620_GPIO_MODE_SPI),
         GRP("uartlite", uartlite_grp, 1, MT7620_GPIO_MODE_UART1),
         GRP_G("wdt", wdt_grp, MT7620_GPIO_MODE_WDT_MASK,
                 MT7620_GPIO_MODE_WDT_GPIO, MT7620_GPIO_MODE_WDT_SHIFT),
         GRP("mdio", mdio_grp, 1, MT7620_GPIO_MODE_MDIO),
         GRP("rgmii1", rgmii1_grp, 1, MT7620_GPIO_MODE_RGMII1),
         GRP("spi refclk", refclk_grp, 1, MT7620_GPIO_MODE_SPI_REF_CLK),
         GRP_G("pcie", pcie_rst_grp, MT7620_GPIO_MODE_PCIE_MASK,
                 MT7620_GPIO_MODE_PCIE_GPIO, MT7620_GPIO_MODE_PCIE_SHIFT),
         GRP_G("nd_sd", nd_sd_grp, MT7620_GPIO_MODE_ND_SD_MASK,
                 MT7620_GPIO_MODE_ND_SD_GPIO,
 MT7620_GPIO_MODE_ND_SD_SHIFT),
         GRP("rgmii2", rgmii2_grp, 1, MT7620_GPIO_MODE_RGMII2),
         GRP("wled", wled_grp, 1, MT7620_GPIO_MODE_WLED),
         GRP("ephy", ephy_grp, 1, MT7620_GPIO_MODE_EPHY),
         GRP("pa", pa_grp, 1, MT7620_GPIO_MODE_PA),
         { 0 }
 };
 }}}

 If used as is, kernel will report an error during the boot:

 {{{
 rt2880-pinmux pinctrl: function 'spi_cs1' not supported
 rt2880-pinmux pinctrl: invalid function 'spi_cs1' in map table
 }}}



 Current workaround is to override with '''spi refclk''' in device DTS file
 (leads to same pin settings as for CS1):

 {{{
         pinctrl {
                 ...

                 spi_cs1: spi1 {
                         spi1 {
                                 ralink,group = "spi refclk";
                                 ralink,function = "spi refclk";
                         };
                 };

                 ...
         }
 }}}

 Note, that there is '''spi cs1''' (no underscore) group/function defined,
 but for different device. '''mt7628an''', is an example.

 Probably '''mt7620a.dtsi''' needs to be updated with proper configuration,
 or '''spi cs1''' added to the map table for '''mt7620a''' device.

--
Ticket URL: <https://dev.openwrt.org/ticket/22191>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to