ARM: dts: meson: set pinmux bias
Subsystems (2)
Jerome Brunet
reviewerv2 cover ARM: dts: meson: set pinmux bias
On Amlogic chipsets, the bias set through pinconf applies to the pad itself, not only the GPIO function. This means that even when we change the function of the pad from GPIO to anything else, the bias previously set still applies.
While trying to boot from SPI, I noticed the eMMC was not working anymore. Even if the related eMMC pad are not used by the SPI, the ROM code sets a pull-down on the eMMC pad and leaves it that way. This breaks the eMMC later on, in both u-boot and Linux.
The underlying issue is that we inherit whatever was left by previous user of the pad (pinconf, u-boot or the ROM code). As a consequence, the actual setup we get is undefined.
There is nothing mentioned in the documentation about pad bias and pinmux function, however leaving it undefined is not an option.
This patchset consistently disable the pad bias for every pinmux functions. It seems to work well, we can only assume that the necessary bias (if any) is already provided by the pin function itself.
I can't really test every pinmux configuration and it is fairly possible I missed something so it would be nice if more people could confirm if nothing (new) is broken after applying this series.
One things could be the i2c. Usually the i2c pull-ups are physically present on the board but, if they are missing on platform, we may define a special pinmux setting with pull-up enabled.
One last gotcha, I recently posted fixups around bias setting to pinctrl which have been merged: [0] [1]. These must be applied before applying this series, otherwise when requesting 'bias-disable' you'll probably get a pull-down instead.
Changes since v1 [2]:
* Fix wrongly placed bias-disable on meson8
[0]: https://lkml.kernel.org/r/20181023160319.27003-1-jbrunet at baylibre.com [1]: https://lkml.kernel.org/r/20181029151340.9087-1-jbrunet at baylibre.com [2]: https://lkml.kernel.org/r/20181108104426.1877-1-jbrunet at baylibre.com
Jerome Brunet (4):
arm64: dts: meson: remove extra subnode in mmc clk_gate pinmux
arm64: dts: meson: disable pad bias for mmc pinmuxes
arm64: dts: meson: consistently disable pin bias
ARM: dts: meson: consistently disable pin bias
arch/arm/boot/dts/meson8.dtsi | 12 +++ arch/arm/boot/dts/meson8b.dtsi | 9 ++ arch/arm/boot/dts/meson8m2.dtsi | 1 + arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 111 ++++++++++++++++++-- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 60 +++++++++-- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 62 +++++++++-- 6 files changed, 231 insertions(+), 24 deletions(-)
Signature · 1 line
2.19.1
Jerome Brunet
reviewerPATCH v2 1/4 arm64: dts: meson: remove extra subnode in mmc clk_gate pinmux
In the pinmux of the mmc clk_gate nodes, we define 2 subnodes. One for the function definition, the other for the bias. This is not necessary since we can define the function and the bias in the same subnode.
--- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 6 ------ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 --------- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 9 --------- 3 files changed, 24 deletions(-)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +0 -6
@@ -280,9 +280,6 @@ mux { groups = "BOOT_8"; function = "gpio_periphs"; - }; - cfg-pull-down { - pins = "BOOT_8"; bias-pull-down; }; };
@@ -513,9 +510,6 @@ mux { groups = "GPIOX_4"; function = "gpio_periphs"; - }; - cfg-pull-down { - pins = "GPIOX_4"; bias-pull-down; }; };
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +0 -9
@@ -377,9 +377,6 @@ mux { groups = "BOOT_8"; function = "gpio_periphs"; - }; - cfg-pull-down { - pins = "BOOT_8"; bias-pull-down; }; };
@@ -426,9 +423,6 @@ mux { groups = "CARD_2"; function = "gpio_periphs"; - }; - cfg-pull-down { - pins = "CARD_2"; bias-pull-down; }; };
@@ -449,9 +443,6 @@ mux { groups = "GPIOX_4"; function = "gpio_periphs"; - }; - cfg-pull-down { - pins = "GPIOX_4"; bias-pull-down; }; };
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +0 -9
@@ -324,9 +324,6 @@ mux { groups = "BOOT_8"; function = "gpio_periphs"; - }; - cfg-pull-down { - pins = "BOOT_8"; bias-pull-down; }; };
@@ -373,9 +370,6 @@ mux { groups = "CARD_2"; function = "gpio_periphs"; - }; - cfg-pull-down { - pins = "CARD_2"; bias-pull-down; }; };
@@ -396,9 +390,6 @@ mux { groups = "GPIOX_4"; function = "gpio_periphs"; - }; - cfg-pull-down { - pins = "GPIOX_4"; bias-pull-down; }; };
Signature · 1 line
2.19.1
Jerome Brunet
reviewerPATCH v2 2/4 arm64: dts: meson: disable pad bias for mmc pinmuxes
In reply to Jerome BrunetIn some cases (such as a boot from SPI) the bootloader or the ROM code may leave a bias pull-down on the mmc pins. If so the MMC will fail during the initialisation.
Explicitly disabling the pinmux solves the problem.
--- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 2 ++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 ++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 4 ++++ 3 files changed, 10 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +2 -0
@@ -273,6 +273,7 @@ "emmc_cmd", "emmc_ds"; function = "emmc"; + bias-disable; }; };
@@ -503,6 +504,7 @@ "sdio_cmd", "sdio_clk"; function = "sdio"; + bias-disable; }; };
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +4 -0
@@ -363,6 +363,7 @@ "emmc_cmd", "emmc_clk"; function = "emmc"; + bias-disable; }; };
@@ -370,6 +371,7 @@ mux { groups = "emmc_ds"; function = "emmc"; + bias-disable; }; };
@@ -416,6 +418,7 @@ "sdcard_cmd", "sdcard_clk"; function = "sdcard"; + bias-disable; }; };
@@ -436,6 +439,7 @@ "sdio_cmd", "sdio_clk"; function = "sdio"; + bias-disable; }; };
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +4 -0
@@ -310,6 +310,7 @@ "emmc_cmd", "emmc_clk"; function = "emmc"; + bias-disable; }; };
@@ -317,6 +318,7 @@ mux { groups = "emmc_ds"; function = "emmc"; + bias-disable; }; };
@@ -363,6 +365,7 @@ "sdcard_cmd", "sdcard_clk"; function = "sdcard"; + bias-disable; }; };
@@ -383,6 +386,7 @@ "sdio_cmd", "sdio_clk"; function = "sdio"; + bias-disable; }; };
Signature · 1 line
2.19.1
Jerome Brunet
reviewerPATCH v2 3/4 arm64: dts: meson: consistently disable pin bias
In reply to Jerome BrunetOn Amlogic chipsets, the bias set through pinconf applies to the pad itself, not only the GPIO function. This means that even when we change the function of the pad from GPIO to anything else, the bias previously set still applies.
As we have seen with the eMMC, depending on the bias type and the function, it may trigger problems.
The underlying issue is that we inherit whatever was left by previous user of the pad (pinconf, u-boot or the ROM code). As a consequence, the actual setup we will get is undefined.
There is nothing mentioned in the documentation about pad bias and pinmux function, however leaving it undefined is not an option.
This change consistently disable the pad bias for every pinmux functions. It seems to work well, we can only assume that the necessary bias (if any) is already provided by the pin function itself.
--- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 103 ++++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 47 +++++++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 49 ++++++++++ 3 files changed, 199 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +103 -0
@@ -200,6 +200,7 @@ groups = "i2c0_sck", "i2c0_sda"; function = "i2c0"; + bias-disable; }; };
@@ -208,6 +209,7 @@ groups = "i2c1_sck_x", "i2c1_sda_x"; function = "i2c1"; + bias-disable; }; };
@@ -216,6 +218,7 @@ groups = "i2c1_sck_z", "i2c1_sda_z"; function = "i2c1"; + bias-disable; }; };
@@ -224,6 +227,7 @@ groups = "i2c2_sck_a", "i2c2_sda_a"; function = "i2c2"; + bias-disable; }; };
@@ -232,6 +236,7 @@ groups = "i2c2_sck_x", "i2c2_sda_x"; function = "i2c2"; + bias-disable; }; };
@@ -240,6 +245,7 @@ groups = "i2c3_sda_a6", "i2c3_sck_a7"; function = "i2c3"; + bias-disable; }; };
@@ -248,6 +254,7 @@ groups = "i2c3_sda_a12", "i2c3_sck_a13"; function = "i2c3"; + bias-disable; }; };
@@ -256,6 +263,7 @@ groups = "i2c3_sda_a19", "i2c3_sck_a20"; function = "i2c3"; + bias-disable; }; };
@@ -302,6 +310,7 @@ "eth_txd2_rgmii", "eth_txd3_rgmii"; function = "eth"; + bias-disable; }; };
@@ -322,6 +331,7 @@ "eth_txd2_rgmii", "eth_txd3_rgmii"; function = "eth"; + bias-disable; }; };
@@ -337,6 +347,7 @@ "eth_txd0_x", "eth_txd1_x"; function = "eth"; + bias-disable; }; };
@@ -352,6 +363,7 @@ "eth_txd0_y", "eth_txd1_y"; function = "eth"; + bias-disable; }; };
@@ -359,6 +371,7 @@ mux { groups = "mclk_b"; function = "mclk_b"; + bias-disable; }; };
@@ -366,6 +379,7 @@ mux { groups = "mclk_c"; function = "mclk_c"; + bias-disable; }; };
@@ -373,6 +387,7 @@ mux { groups = "pdm_dclk_a14"; function = "pdm"; + bias-disable; }; };
@@ -380,6 +395,7 @@ mux { groups = "pdm_dclk_a19"; function = "pdm"; + bias-disable; }; };
@@ -387,6 +403,7 @@ mux { groups = "pdm_din0"; function = "pdm"; + bias-disable; }; };
@@ -394,6 +411,7 @@ mux { groups = "pdm_din1"; function = "pdm"; + bias-disable; }; };
@@ -401,6 +419,7 @@ mux { groups = "pdm_din2"; function = "pdm"; + bias-disable; }; };
@@ -408,6 +427,7 @@ mux { groups = "pdm_din3"; function = "pdm"; + bias-disable; }; };
@@ -415,6 +435,7 @@ mux { groups = "pwm_a_a"; function = "pwm_a"; + bias-disable; }; };
@@ -422,6 +443,7 @@ mux { groups = "pwm_a_x18"; function = "pwm_a"; + bias-disable; }; };
@@ -429,6 +451,7 @@ mux { groups = "pwm_a_x20"; function = "pwm_a"; + bias-disable; }; };
@@ -436,6 +459,7 @@ mux { groups = "pwm_a_z"; function = "pwm_a"; + bias-disable; }; };
@@ -443,6 +467,7 @@ mux { groups = "pwm_b_a"; function = "pwm_b"; + bias-disable; }; };
@@ -450,6 +475,7 @@ mux { groups = "pwm_b_x"; function = "pwm_b"; + bias-disable; }; };
@@ -457,6 +483,7 @@ mux { groups = "pwm_b_z"; function = "pwm_b"; + bias-disable; }; };
@@ -464,6 +491,7 @@ mux { groups = "pwm_c_a"; function = "pwm_c"; + bias-disable; }; };
@@ -471,6 +499,7 @@ mux { groups = "pwm_c_x10"; function = "pwm_c"; + bias-disable; }; };
@@ -478,6 +507,7 @@ mux { groups = "pwm_c_x17"; function = "pwm_c"; + bias-disable; }; };
@@ -485,6 +515,7 @@ mux { groups = "pwm_d_x11"; function = "pwm_d"; + bias-disable; }; };
@@ -492,6 +523,7 @@ mux { groups = "pwm_d_x16"; function = "pwm_d"; + bias-disable; }; };
@@ -520,6 +552,7 @@ mux { groups = "spdif_in_z"; function = "spdif_in"; + bias-disable; }; };
@@ -527,6 +560,7 @@ mux { groups = "spdif_in_a1"; function = "spdif_in"; + bias-disable; }; };
@@ -534,6 +568,7 @@ mux { groups = "spdif_in_a7"; function = "spdif_in"; + bias-disable; }; };
@@ -541,6 +576,7 @@ mux { groups = "spdif_in_a19"; function = "spdif_in"; + bias-disable; }; };
@@ -548,6 +584,7 @@ mux { groups = "spdif_in_a20"; function = "spdif_in"; + bias-disable; }; };
@@ -555,6 +592,7 @@ mux { groups = "spdif_out_a1"; function = "spdif_out"; + bias-disable; }; };
@@ -562,6 +600,7 @@ mux { groups = "spdif_out_a11"; function = "spdif_out"; + bias-disable; }; };
@@ -569,6 +608,7 @@ mux { groups = "spdif_out_a19"; function = "spdif_out"; + bias-disable; }; };
@@ -576,6 +616,7 @@ mux { groups = "spdif_out_a20"; function = "spdif_out"; + bias-disable; }; };
@@ -583,6 +624,7 @@ mux { groups = "spdif_out_z"; function = "spdif_out"; + bias-disable; }; };
@@ -592,6 +634,7 @@ "spi0_mosi", "spi0_clk"; function = "spi0"; + bias-disable; }; };
@@ -599,6 +642,7 @@ mux { groups = "spi0_ss0"; function = "spi0"; + bias-disable; }; };
@@ -606,6 +650,7 @@ mux { groups = "spi0_ss1"; function = "spi0"; + bias-disable; }; };
@@ -613,6 +658,7 @@ mux { groups = "spi0_ss2"; function = "spi0"; + bias-disable; }; };
@@ -622,6 +668,7 @@ "spi1_mosi_a", "spi1_clk_a"; function = "spi1"; + bias-disable; }; };
@@ -629,6 +676,7 @@ mux { groups = "spi1_ss0_a"; function = "spi1"; + bias-disable; }; };
@@ -636,6 +684,7 @@ mux { groups = "spi1_ss1"; function = "spi1"; + bias-disable; }; };
@@ -645,6 +694,7 @@ "spi1_mosi_x", "spi1_clk_x"; function = "spi1"; + bias-disable; }; };
@@ -652,6 +702,7 @@ mux { groups = "spi1_ss0_x"; function = "spi1"; + bias-disable; }; };
@@ -659,6 +710,7 @@ mux { groups = "tdma_din0"; function = "tdma"; + bias-disable; }; };
@@ -666,6 +718,7 @@ mux { groups = "tdma_dout0_x14"; function = "tdma"; + bias-disable; }; };
@@ -673,6 +726,7 @@ mux { groups = "tdma_dout0_x15"; function = "tdma"; + bias-disable; }; };
@@ -680,6 +734,7 @@ mux { groups = "tdma_dout1"; function = "tdma"; + bias-disable; }; };
@@ -687,6 +742,7 @@ mux { groups = "tdma_din1"; function = "tdma"; + bias-disable; }; };
@@ -694,6 +750,7 @@ mux { groups = "tdma_fs"; function = "tdma"; + bias-disable; }; };
@@ -701,6 +758,7 @@ mux { groups = "tdma_fs_slv"; function = "tdma"; + bias-disable; }; };
@@ -708,6 +766,7 @@ mux { groups = "tdma_sclk"; function = "tdma"; + bias-disable; }; };
@@ -715,6 +774,7 @@ mux { groups = "tdma_sclk_slv"; function = "tdma"; + bias-disable; }; };
@@ -722,6 +782,7 @@ mux { groups = "tdmb_din0"; function = "tdmb"; + bias-disable; }; };
@@ -729,6 +790,7 @@ mux { groups = "tdmb_din1"; function = "tdmb"; + bias-disable; }; };
@@ -736,6 +798,7 @@ mux { groups = "tdmb_din2"; function = "tdmb"; + bias-disable; }; };
@@ -743,6 +806,7 @@ mux { groups = "tdmb_din3"; function = "tdmb"; + bias-disable; }; };
@@ -750,6 +814,7 @@ mux { groups = "tdmb_dout0"; function = "tdmb"; + bias-disable; }; };
@@ -757,6 +822,7 @@ mux { groups = "tdmb_dout1"; function = "tdmb"; + bias-disable; }; };
@@ -764,6 +830,7 @@ mux { groups = "tdmb_dout2"; function = "tdmb"; + bias-disable; }; };
@@ -771,6 +838,7 @@ mux { groups = "tdmb_dout3"; function = "tdmb"; + bias-disable; }; };
@@ -778,6 +846,7 @@ mux { groups = "tdmb_fs"; function = "tdmb"; + bias-disable; }; };
@@ -785,6 +854,7 @@ mux { groups = "tdmb_fs_slv"; function = "tdmb"; + bias-disable; }; };
@@ -792,6 +862,7 @@ mux { groups = "tdmb_sclk"; function = "tdmb"; + bias-disable; }; };
@@ -799,6 +870,7 @@ mux { groups = "tdmb_sclk_slv"; function = "tdmb"; + bias-disable; }; };
@@ -806,6 +878,7 @@ mux { groups = "tdmc_fs"; function = "tdmc"; + bias-disable; }; };
@@ -813,6 +886,7 @@ mux { groups = "tdmc_fs_slv"; function = "tdmc"; + bias-disable; }; };
@@ -820,6 +894,7 @@ mux { groups = "tdmc_sclk"; function = "tdmc"; + bias-disable; }; };
@@ -827,6 +902,7 @@ mux { groups = "tdmc_sclk_slv"; function = "tdmc"; + bias-disable; }; };
@@ -834,6 +910,7 @@ mux { groups = "tdmc_din0"; function = "tdmc"; + bias-disable; }; };
@@ -841,6 +918,7 @@ mux { groups = "tdmc_din1"; function = "tdmc"; + bias-disable; }; };
@@ -848,6 +926,7 @@ mux { groups = "tdmc_din2"; function = "tdmc"; + bias-disable; }; };
@@ -855,6 +934,7 @@ mux { groups = "tdmc_din3"; function = "tdmc"; + bias-disable; }; };
@@ -862,6 +942,7 @@ mux { groups = "tdmc_dout0"; function = "tdmc"; + bias-disable; }; };
@@ -869,6 +950,7 @@ mux { groups = "tdmc_dout1"; function = "tdmc"; + bias-disable; }; };
@@ -876,6 +958,7 @@ mux { groups = "tdmc_dout2"; function = "tdmc"; + bias-disable; }; };
@@ -883,6 +966,7 @@ mux { groups = "tdmc_dout3"; function = "tdmc"; + bias-disable; }; };
@@ -891,6 +975,7 @@ groups = "uart_tx_a", "uart_rx_a"; function = "uart_a"; + bias-disable; }; };
@@ -899,6 +984,7 @@ groups = "uart_cts_a", "uart_rts_a"; function = "uart_a"; + bias-disable; }; };
@@ -907,6 +993,7 @@ groups = "uart_tx_b_x", "uart_rx_b_x"; function = "uart_b"; + bias-disable; }; };
@@ -915,6 +1002,7 @@ groups = "uart_cts_b_x", "uart_rts_b_x"; function = "uart_b"; + bias-disable; }; };
@@ -923,6 +1011,7 @@ groups = "uart_tx_b_z", "uart_rx_b_z"; function = "uart_b"; + bias-disable; }; };
@@ -931,6 +1020,7 @@ groups = "uart_cts_b_z", "uart_rts_b_z"; function = "uart_b"; + bias-disable; }; };
@@ -939,6 +1029,7 @@ groups = "uart_ao_tx_b_z", "uart_ao_rx_b_z"; function = "uart_ao_b_z"; + bias-disable; }; };
@@ -947,6 +1038,7 @@ groups = "uart_ao_cts_b_z", "uart_ao_rts_b_z"; function = "uart_ao_b_z"; + bias-disable; }; }; };
@@ -1235,6 +1327,7 @@ mux { groups = "i2c_ao_sck_4"; function = "i2c_ao"; + bias-disable; }; };
@@ -1242,6 +1335,7 @@ mux { groups = "i2c_ao_sck_8"; function = "i2c_ao"; + bias-disable; }; };
@@ -1249,6 +1343,7 @@ mux { groups = "i2c_ao_sck_10"; function = "i2c_ao"; + bias-disable; }; };
@@ -1256,6 +1351,7 @@ mux { groups = "i2c_ao_sda_5"; function = "i2c_ao"; + bias-disable; }; };
@@ -1263,6 +1359,7 @@ mux { groups = "i2c_ao_sda_9"; function = "i2c_ao"; + bias-disable; }; };
@@ -1270,6 +1367,7 @@ mux { groups = "i2c_ao_sda_11"; function = "i2c_ao"; + bias-disable; }; };
@@ -1277,6 +1375,7 @@ mux { groups = "remote_input_ao"; function = "remote_input_ao"; + bias-disable; }; };
@@ -1285,6 +1384,7 @@ groups = "uart_ao_tx_a", "uart_ao_rx_a"; function = "uart_ao_a"; + bias-disable; }; };
@@ -1293,6 +1393,7 @@ groups = "uart_ao_cts_a", "uart_ao_rts_a"; function = "uart_ao_a"; + bias-disable; }; };
@@ -1301,6 +1402,7 @@ groups = "uart_ao_tx_b", "uart_ao_rx_b"; function = "uart_ao_b"; + bias-disable; }; };
@@ -1309,6 +1411,7 @@ groups = "uart_ao_cts_b", "uart_ao_rts_b"; function = "uart_ao_b"; + bias-disable; }; }; };
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +47 -0
329 lines not on this page · raw message
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +49 -0
343 lines not on this page · raw message
Signature · 1 line
2.19.1
Jerome Brunet
reviewerPATCH v2 4/4 ARM: dts: meson: consistently disable pin bias
In reply to Jerome BrunetOn Amlogic chipsets, the bias set through pinconf applies to the pad itself, not only the GPIO function. This means that even when we change the function of the pad from GPIO to anything else, the bias previously set still applies.
As we have seen with the eMMC, depending on the bias type and the function, it may trigger problems.
The underlying issue is that we inherit whatever was left by previous user of the pad (pinconf, u-boot or the ROM code). As a consequence, the actual setup we will get is undefined.
There is nothing mentioned in the documentation about pad bias and pinmux function, however leaving it undefined is not an option.
This change consistently disable the pad bias for every pinmux functions. It seems to work well, we can only assume that the necessary bias (if any) is already provided by the pin function itself.
--- arch/arm/boot/dts/meson8.dtsi | 12 ++++++++++++ arch/arm/boot/dts/meson8b.dtsi | 9 +++++++++ arch/arm/boot/dts/meson8m2.dtsi | 1 + 3 files changed, 22 insertions(+)
arch/arm/boot/dts/meson8.dtsi +12 -0
@@ -163,6 +163,7 @@ mux { groups = "uart_tx_ao_a", "uart_rx_ao_a"; function = "uart_ao"; + bias-disable; }; };
@@ -170,6 +171,7 @@ mux { groups = "i2c_mst_sck_ao", "i2c_mst_sda_ao"; function = "i2c_mst_ao"; + bias-disable; }; };
@@ -177,6 +179,7 @@ mux { groups = "remote_input"; function = "remote"; + bias-disable; }; };
@@ -184,6 +187,7 @@ mux { groups = "pwm_f_ao"; function = "pwm_f_ao"; + bias-disable; }; }; };
@@ -238,6 +242,7 @@ groups = "sd_d0_a", "sd_d1_a", "sd_d2_a", "sd_d3_a", "sd_clk_a", "sd_cmd_a"; function = "sd_a"; + bias-disable; }; };
@@ -246,6 +251,7 @@ groups = "sd_d0_b", "sd_d1_b", "sd_d2_b", "sd_d3_b", "sd_clk_b", "sd_cmd_b"; function = "sd_b"; + bias-disable; }; };
@@ -254,6 +260,7 @@ groups = "sd_d0_c", "sd_d1_c", "sd_d2_c", "sd_d3_c", "sd_clk_c", "sd_cmd_c"; function = "sd_c"; + bias-disable; }; };
@@ -261,6 +268,7 @@ mux { groups = "nor_d", "nor_q", "nor_c", "nor_cs"; function = "nor"; + bias-disable; }; };
@@ -272,6 +280,7 @@ "eth_rxd1", "eth_rxd0", "eth_mdio", "eth_mdc"; function = "ethernet"; + bias-disable; }; };
@@ -279,6 +288,7 @@ mux { groups = "pwm_e"; function = "pwm_e"; + bias-disable; }; };
@@ -287,6 +297,7 @@ groups = "uart_tx_a1", "uart_rx_a1"; function = "uart_a"; + bias-disable; }; };
@@ -295,6 +306,7 @@ groups = "uart_cts_a1", "uart_rts_a1"; function = "uart_a"; + bias-disable; }; }; };
arch/arm/boot/dts/meson8b.dtsi +9 -0
@@ -146,6 +146,7 @@ mux { groups = "uart_tx_ao_a", "uart_rx_ao_a"; function = "uart_ao"; + bias-disable; }; };
@@ -153,6 +154,7 @@ mux { groups = "remote_input"; function = "remote"; + bias-disable; }; }; };
@@ -220,6 +222,7 @@ "eth_txd2", "eth_txd3"; function = "ethernet"; + bias-disable; }; };
@@ -235,6 +238,7 @@ "eth_mdio_en", "eth_mdc"; function = "ethernet"; + bias-disable; }; };
@@ -242,6 +246,7 @@ mux { groups = "i2c_sda_a", "i2c_sck_a"; function = "i2c_a"; + bias-disable; }; };
@@ -250,6 +255,7 @@ groups = "sd_d0_b", "sd_d1_b", "sd_d2_b", "sd_d3_b", "sd_clk_b", "sd_cmd_b"; function = "sd_b"; + bias-disable; }; };
@@ -257,6 +263,7 @@ mux { groups = "pwm_c1"; function = "pwm_c"; + bias-disable; }; };
@@ -265,6 +272,7 @@ groups = "uart_tx_b0", "uart_rx_b0"; function = "uart_b"; + bias-disable; }; };
@@ -273,6 +281,7 @@ groups = "uart_cts_b0", "uart_rts_b0"; function = "uart_b"; + bias-disable; }; }; };
arch/arm/boot/dts/meson8m2.dtsi +1 -0
@@ -45,6 +45,7 @@ "eth_rxd1", "eth_rxd0", "eth_mdio", "eth_mdc"; function = "ethernet"; + bias-disable; }; }; };
Signature · 1 line
2.19.1
Re: [PATCH v2 4/4] ARM: dts: meson: consistently disable pin bias
Quoted 13 lines · Jerome Brunet
On Amlogic chipsets, the bias set through pinconf applies to the pad itself, not only the GPIO function. This means that even when we change the function of the pad from GPIO to anything else, the bias previously set still applies.
As we have seen with the eMMC, depending on the bias type and the function, it may trigger problems.
The underlying issue is that we inherit whatever was left by previous user of the pad (pinconf, u-boot or the ROM code). As a consequence, the actual setup we will get is undefined.
Quoted 8 lines
There is nothing mentioned in the documentation about pad bias and pinmux function, however leaving it undefined is not an option.
This change consistently disable the pad bias for every pinmux functions. It seems to work well, we can only assume that the necessary bias (if any) is already provided by the pin function itself.
Signed-off-by Jerome Brunet <[email protected]>
my Odroid-C1 still boots fine from SD card and Ethernet (ping) also still works
Kevin, can you please move this patch from your v4.21/dt64 branch to the v4.21/dt (32-bit) branch?
all other patches from this series are for the 64-bit SoCs, so only this single patch has to be moved
Thank you!
Regards
Martin
Kevin Hilman
maintainerRe: [PATCH v2 4/4] ARM: dts: meson: consistently disable pin bias
Quoted 22 lines · Martin Blumenstingl
Quoted 13 lines · Jerome Brunet
On Amlogic chipsets, the bias set through pinconf applies to the pad itself, not only the GPIO function. This means that even when we change the function of the pad from GPIO to anything else, the bias previously set still applies.
As we have seen with the eMMC, depending on the bias type and the function, it may trigger problems.
The underlying issue is that we inherit whatever was left by previous user of the pad (pinconf, u-boot or the ROM code). As a consequence, the actual setup we will get is undefined.
Quoted 8 lines
There is nothing mentioned in the documentation about pad bias and pinmux function, however leaving it undefined is not an option.
This change consistently disable the pad bias for every pinmux functions. It seems to work well, we can only assume that the necessary bias (if any) is already provided by the pin function itself.
Signed-off-by Jerome Brunet <[email protected]>
Quoted 8 lines
my Odroid-C1 still boots fine from SD card and Ethernet (ping) also still works
Kevin, can you please move this patch from your v4.21/dt64 branch to the v4.21/dt (32-bit) branch?
all other patches from this series are for the 64-bit SoCs, so only this single patch has to be moved
Thanks for catching it.
I moved it to the 32-bit branch, and added your ack.
Kevin
Kevin Hilman
maintainerQuoted 17 lines · Jerome Brunet
On Amlogic chipsets, the bias set through pinconf applies to the pad itself, not only the GPIO function. This means that even when we change the function of the pad from GPIO to anything else, the bias previously set still applies.
While trying to boot from SPI, I noticed the eMMC was not working anymore. Even if the related eMMC pad are not used by the SPI, the ROM code sets a pull-down on the eMMC pad and leaves it that way. This breaks the eMMC later on, in both u-boot and Linux.
The underlying issue is that we inherit whatever was left by previous user of the pad (pinconf, u-boot or the ROM code). As a consequence, the actual setup we get is undefined.
There is nothing mentioned in the documentation about pad bias and pinmux function, however leaving it undefined is not an option.
Quoted 7 lines
This patchset consistently disable the pad bias for every pinmux functions. It seems to work well, we can only assume that the necessary bias (if any) is already provided by the pin function itself.
I can't really test every pinmux configuration and it is fairly possible I missed something so it would be nice if more people could confirm if nothing (new) is broken after applying this series.
I'll queue this up for v4.21/dt64 branch for a bit broader testing.
Quoted 8 lines
One things could be the i2c. Usually the i2c pull-ups are physically present on the board but, if they are missing on platform, we may define a special pinmux setting with pull-up enabled.
One last gotcha, I recently posted fixups around bias setting to pinctrl which have been merged: [0] [1]. These must be applied before applying this series, otherwise when requesting 'bias-disable' you'll probably get a pull-down instead.
OK, I'll include pinctrl/for-next branch in my 'integ' branch.
Kevin