Opened 22 months ago

Last modified 22 months ago

#22191 new defect

MT7620a DTS refers to invalid pin group/function 'spi_cs1'

Reported by: yarshevich@… Owned by: developers
Priority: normal Milestone:
Component: kernel Version: Trunk
Keywords: SPI Cc:


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-

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,
	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,
	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,
	GRP_G("nd_sd", nd_sd_grp, MT7620_GPIO_MODE_ND_SD_MASK,
	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.

Attachments (2)

mt7620a.dtsi (9.1 KB) - added by yarshevich@… 22 months ago.
Current DTS for MT7620a
mt7620.c (15.7 KB) - added by yarshevich@… 22 months ago.
Current pins map definition for MT7620a device

Download all attachments as: .zip

Change History (3)

Changed 22 months ago by yarshevich@…

Current DTS for MT7620a

Changed 22 months ago by yarshevich@…

Current pins map definition for MT7620a device

comment:1 Changed 22 months ago by anonymous

does this affect all mt7620a devices?

Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.