Skip to content

Commit 284ad70

Browse files
Josua-SRnxpfrankli
authored andcommitted
arm64: dts: lx2160a: complete pinmux for rcwsr12 configuration word
Commit 8a1365c ("arm64: dts: lx2160a: add pinmux and i2c gpio to support bus recovery") introduced pinmux nodes for lx2160 i2c interfaces, allowing runtime change between i2c and gpio functions implementing bus recovery. However, the dynamic configuration area (overwrite MUX) used by the pinctrl-single driver initially reads as zero and does not reflect the actual hardware state set by the Reset Configuration Word (RCW) at power-on. Because multiple groups of pins are configured from a single 32-bit register, the first write from the pinctrl driver unintentionally clears all other bits to zero. Add description for all bits of RCWSR12 register, allowing boards to explicitly define and restore their intended hardware state. This includes i2c, gpio, flextimer, spi, can and sdhc functions. Other configuration words, i.e. RCWSR13 & RCWSR14 may be added in the future for boards setting non-zero values there. Fixes: 8a1365c ("arm64: dts: lx2160a: add pinmux and i2c gpio to support bus recovery") Signed-off-by: Josua Mayer <josua@solid-run.com> Signed-off-by: Frank Li <Frank.Li@nxp.com>
1 parent 0324162 commit 284ad70

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,6 +1721,7 @@
17211721
pinctrl-single,register-width = <32>;
17221722
pinctrl-single,function-mask = <0x7>;
17231723

1724+
/* RCWSR12 */
17241725
i2c1_pins: iic2-i2c-pins {
17251726
pinctrl-single,bits = <0x0 0x0 0x7>;
17261727
};
@@ -1729,6 +1730,10 @@
17291730
pinctrl-single,bits = <0x0 0x1 0x7>;
17301731
};
17311732

1733+
ftm0_ch10_pins: iic2-ftm-pins {
1734+
pinctrl-single,bits = <0x0 0x2 0x7>;
1735+
};
1736+
17321737
esdhc0_cd_wp_pins: iic2-sdhc-pins {
17331738
pinctrl-single,bits = <0x0 0x6 0x7>;
17341739
};
@@ -1741,6 +1746,14 @@
17411746
pinctrl-single,bits = <0x0 (0x1 << 3) (0x7 << 3)>;
17421747
};
17431748

1749+
can0_pins: iic3-can-pins {
1750+
pinctrl-single,bits = <0x0 (0x2 << 3) (0x7 << 3)>;
1751+
};
1752+
1753+
event65_pins: iic3-event-pins {
1754+
pinctrl-single,bits = <0x0 (0x6 << 3) (0x7 << 3)>;
1755+
};
1756+
17441757
i2c3_pins: iic4-i2c-pins {
17451758
pinctrl-single,bits = <0x0 0x0 (0x7 << 6)>;
17461759
};
@@ -1749,6 +1762,14 @@
17491762
pinctrl-single,bits = <0x0 (0x1 << 6) (0x7 << 6)>;
17501763
};
17511764

1765+
can1_pins: iic4-can-pins {
1766+
pinctrl-single,bits = <0x0 (0x2 << 6) (0x7 << 6)>;
1767+
};
1768+
1769+
event87_pins: iic4-event-pins {
1770+
pinctrl-single,bits = <0x0 (0x6 << 6) (0x7 << 6)>;
1771+
};
1772+
17521773
i2c4_pins: iic5-i2c-pins {
17531774
pinctrl-single,bits = <0x0 0x0 (0x7 << 9)>;
17541775
};
@@ -1757,6 +1778,14 @@
17571778
pinctrl-single,bits = <0x0 (0x1 << 9) (0x7 << 9)>;
17581779
};
17591780

1781+
esdhc0_clksync_pins: iic5-sdhc-clk-pins {
1782+
pinctrl-single,bits = <0x0 (0x2 << 9) (0x7 << 9)>;
1783+
};
1784+
1785+
dspi2_miso_mosi_pins: iic5-spi3-pins {
1786+
pinctrl-single,bits = <0x3 (0x2 << 9) (0x7 << 9)>;
1787+
};
1788+
17601789
i2c5_pins: iic6-i2c-pins {
17611790
pinctrl-single,bits = <0x0 0x0 (0x7 << 12)>;
17621791
};
@@ -1765,26 +1794,71 @@
17651794
pinctrl-single,bits = <0x0 (0x1 << 12) (0x7 << 12)>;
17661795
};
17671796

1797+
esdhc1_clksync_pins: iic6-sdhc-clk-pins {
1798+
pinctrl-single,bits = <0x0 (0x2 << 12) (0x7 << 12)>;
1799+
};
1800+
17681801
fspi_data74_pins: xspi1-data74-pins {
17691802
pinctrl-single,bits = <0x0 0x0 (0x7 << 15)>;
17701803
};
17711804

1805+
gpio1_31_28_pins: xspi1-data74-gpio-pins {
1806+
pinctrl-single,bits = <0x0 0x1 (0x7 << 15)>;
1807+
};
1808+
17721809
fspi_data30_pins: xspi1-data30-pins {
17731810
pinctrl-single,bits = <0x0 0x0 (0x7 << 18)>;
17741811
};
17751812

1813+
gpio1_27_24_pins: xspi1-data30-gpio-pins {
1814+
pinctrl-single,bits = <0x0 0x1 (0x7 << 18)>;
1815+
};
1816+
17761817
fspi_dqs_sck_cs10_pins: xspi1-base-pins {
17771818
pinctrl-single,bits = <0x0 0x0 (0x7 << 21)>;
17781819
};
17791820

1821+
gpio1_23_20_pins: xspi1-base-gpio-pins {
1822+
pinctrl-single,bits = <0x0 0x1 (0x7 << 21)>;
1823+
};
1824+
17801825
esdhc0_cmd_data30_clk_vsel_pins: sdhc1-base-sdhc-vsel-pins {
17811826
pinctrl-single,bits = <0x0 0x0 (0x7 << 24)>;
17821827
};
17831828

1829+
gpio0_21_15_pins: sdhc1-base-gpio-pins {
1830+
pinctrl-single,bits = <0x0 (0x1 << 24) (0x7 << 24)>;
1831+
};
1832+
1833+
dspi0_pins: sdhc1-base-spi1-pins {
1834+
pinctrl-single,bits = <0x0 (0x2 << 24) (0x7 << 24)>;
1835+
};
1836+
1837+
esdhc0_cmd_data30_clk_dspi2_cs0_pins: sdhc1-base-sdhc-spi3-pins {
1838+
pinctrl-single,bits = <0x0 (0x3 << 24) (0x7 << 24)>;
1839+
};
1840+
1841+
esdhc0_cmd_data30_clk_data4_pins: sdhc1-base-sdhc-data4-pins {
1842+
pinctrl-single,bits = <0x0 (0x4 << 24) (0x7 << 24)>;
1843+
};
1844+
1845+
esdhc0_dir_pins: sdhc1-dir-pins {
1846+
pinctrl-single,bits = <0x0 0x0 (0x7 << 27)>;
1847+
};
1848+
17841849
gpio0_14_12_pins: sdhc1-dir-gpio-pins {
17851850
pinctrl-single,bits = <0x0 (0x1 << 27) (0x7 << 27)>;
17861851
};
17871852

1853+
dspi2_cs31_pins: sdhc1-dir-spi3-pins {
1854+
pinctrl-single,bits = <0x0 (0x3 << 27) (0x7 << 27)>;
1855+
};
1856+
1857+
esdhc0_data75_pins: sdhc1-dir-sdhc-pins {
1858+
pinctrl-single,bits = <0x0 (0x4 << 27) (0x7 << 27)>;
1859+
};
1860+
1861+
/* RCWSR13 */
17881862
gpio1_18_15_pins: iic8-iic7-gpio-pins {
17891863
pinctrl-single,bits = <0x4 0x1 0x7>;
17901864
};
@@ -1793,6 +1867,7 @@
17931867
pinctrl-single,bits = <0x4 0x2 0x7>;
17941868
};
17951869

1870+
/* RCWSR14 */
17961871
i2c0_pins: iic1-i2c-pins {
17971872
pinctrl-single,bits = <0x8 0x0 (0x1 << 10)>;
17981873
};

0 commit comments

Comments
 (0)