Skip to content

Commit 3341ca4

Browse files
Josua-SRgregkh
authored andcommitted
arm64: dts: lx2160a: complete pinmux for rcwsr12 configuration word
[ Upstream commit 284ad70 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 857dbf1 commit 3341ca4

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
@@ -1717,6 +1717,7 @@
17171717
pinctrl-single,register-width = <32>;
17181718
pinctrl-single,function-mask = <0x7>;
17191719

1720+
/* RCWSR12 */
17201721
i2c1_pins: iic2-i2c-pins {
17211722
pinctrl-single,bits = <0x0 0x0 0x7>;
17221723
};
@@ -1725,6 +1726,10 @@
17251726
pinctrl-single,bits = <0x0 0x1 0x7>;
17261727
};
17271728

1729+
ftm0_ch10_pins: iic2-ftm-pins {
1730+
pinctrl-single,bits = <0x0 0x2 0x7>;
1731+
};
1732+
17281733
esdhc0_cd_wp_pins: iic2-sdhc-pins {
17291734
pinctrl-single,bits = <0x0 0x6 0x7>;
17301735
};
@@ -1737,6 +1742,14 @@
17371742
pinctrl-single,bits = <0x0 (0x1 << 3) (0x7 << 3)>;
17381743
};
17391744

1745+
can0_pins: iic3-can-pins {
1746+
pinctrl-single,bits = <0x0 (0x2 << 3) (0x7 << 3)>;
1747+
};
1748+
1749+
event65_pins: iic3-event-pins {
1750+
pinctrl-single,bits = <0x0 (0x6 << 3) (0x7 << 3)>;
1751+
};
1752+
17401753
i2c3_pins: iic4-i2c-pins {
17411754
pinctrl-single,bits = <0x0 0x0 (0x7 << 6)>;
17421755
};
@@ -1745,6 +1758,14 @@
17451758
pinctrl-single,bits = <0x0 (0x1 << 6) (0x7 << 6)>;
17461759
};
17471760

1761+
can1_pins: iic4-can-pins {
1762+
pinctrl-single,bits = <0x0 (0x2 << 6) (0x7 << 6)>;
1763+
};
1764+
1765+
event87_pins: iic4-event-pins {
1766+
pinctrl-single,bits = <0x0 (0x6 << 6) (0x7 << 6)>;
1767+
};
1768+
17481769
i2c4_pins: iic5-i2c-pins {
17491770
pinctrl-single,bits = <0x0 0x0 (0x7 << 9)>;
17501771
};
@@ -1753,6 +1774,14 @@
17531774
pinctrl-single,bits = <0x0 (0x1 << 9) (0x7 << 9)>;
17541775
};
17551776

1777+
esdhc0_clksync_pins: iic5-sdhc-clk-pins {
1778+
pinctrl-single,bits = <0x0 (0x2 << 9) (0x7 << 9)>;
1779+
};
1780+
1781+
dspi2_miso_mosi_pins: iic5-spi3-pins {
1782+
pinctrl-single,bits = <0x3 (0x2 << 9) (0x7 << 9)>;
1783+
};
1784+
17561785
i2c5_pins: iic6-i2c-pins {
17571786
pinctrl-single,bits = <0x0 0x0 (0x7 << 12)>;
17581787
};
@@ -1761,26 +1790,71 @@
17611790
pinctrl-single,bits = <0x0 (0x1 << 12) (0x7 << 12)>;
17621791
};
17631792

1793+
esdhc1_clksync_pins: iic6-sdhc-clk-pins {
1794+
pinctrl-single,bits = <0x0 (0x2 << 12) (0x7 << 12)>;
1795+
};
1796+
17641797
fspi_data74_pins: xspi1-data74-pins {
17651798
pinctrl-single,bits = <0x0 0x0 (0x7 << 15)>;
17661799
};
17671800

1801+
gpio1_31_28_pins: xspi1-data74-gpio-pins {
1802+
pinctrl-single,bits = <0x0 0x1 (0x7 << 15)>;
1803+
};
1804+
17681805
fspi_data30_pins: xspi1-data30-pins {
17691806
pinctrl-single,bits = <0x0 0x0 (0x7 << 18)>;
17701807
};
17711808

1809+
gpio1_27_24_pins: xspi1-data30-gpio-pins {
1810+
pinctrl-single,bits = <0x0 0x1 (0x7 << 18)>;
1811+
};
1812+
17721813
fspi_dqs_sck_cs10_pins: xspi1-base-pins {
17731814
pinctrl-single,bits = <0x0 0x0 (0x7 << 21)>;
17741815
};
17751816

1817+
gpio1_23_20_pins: xspi1-base-gpio-pins {
1818+
pinctrl-single,bits = <0x0 0x1 (0x7 << 21)>;
1819+
};
1820+
17761821
esdhc0_cmd_data30_clk_vsel_pins: sdhc1-base-sdhc-vsel-pins {
17771822
pinctrl-single,bits = <0x0 0x0 (0x7 << 24)>;
17781823
};
17791824

1825+
gpio0_21_15_pins: sdhc1-base-gpio-pins {
1826+
pinctrl-single,bits = <0x0 (0x1 << 24) (0x7 << 24)>;
1827+
};
1828+
1829+
dspi0_pins: sdhc1-base-spi1-pins {
1830+
pinctrl-single,bits = <0x0 (0x2 << 24) (0x7 << 24)>;
1831+
};
1832+
1833+
esdhc0_cmd_data30_clk_dspi2_cs0_pins: sdhc1-base-sdhc-spi3-pins {
1834+
pinctrl-single,bits = <0x0 (0x3 << 24) (0x7 << 24)>;
1835+
};
1836+
1837+
esdhc0_cmd_data30_clk_data4_pins: sdhc1-base-sdhc-data4-pins {
1838+
pinctrl-single,bits = <0x0 (0x4 << 24) (0x7 << 24)>;
1839+
};
1840+
1841+
esdhc0_dir_pins: sdhc1-dir-pins {
1842+
pinctrl-single,bits = <0x0 0x0 (0x7 << 27)>;
1843+
};
1844+
17801845
gpio0_14_12_pins: sdhc1-dir-gpio-pins {
17811846
pinctrl-single,bits = <0x0 (0x1 << 27) (0x7 << 27)>;
17821847
};
17831848

1849+
dspi2_cs31_pins: sdhc1-dir-spi3-pins {
1850+
pinctrl-single,bits = <0x0 (0x3 << 27) (0x7 << 27)>;
1851+
};
1852+
1853+
esdhc0_data75_pins: sdhc1-dir-sdhc-pins {
1854+
pinctrl-single,bits = <0x0 (0x4 << 27) (0x7 << 27)>;
1855+
};
1856+
1857+
/* RCWSR13 */
17841858
gpio1_18_15_pins: iic8-iic7-gpio-pins {
17851859
pinctrl-single,bits = <0x4 0x1 0x7>;
17861860
};
@@ -1789,6 +1863,7 @@
17891863
pinctrl-single,bits = <0x4 0x2 0x7>;
17901864
};
17911865

1866+
/* RCWSR14 */
17921867
i2c0_pins: iic1-i2c-pins {
17931868
pinctrl-single,bits = <0x8 0x0 (0x1 << 10)>;
17941869
};

0 commit comments

Comments
 (0)