Devicetree fixes and additions for Kontron SL/BL i.MX8MM boards
Subsystems (3)
v2 cover Devicetree fixes and additions for Kontron SL/BL i.MX8MM boards
From: Frieder Schrempf <[email protected]>
This is a set of enhancements and fixes for the devicetrees of the Kontron SL/BL i.MX8MM SoMs and boards.
See the individual patches for more information and changelogs.
For v2, the review comments from Shawn ahve been taken into account (thanks!) and the patches 7 and 8 have been dropped, as they were already applied separately.
Frieder Schrempf (6):
arm64: dts: imx8mm-kontron: Add support for ultra high speed modes on
SD card
arm64: dts: imx8mm-kontron: Make sure SOC and DRAM supply voltages are
correct
arm64: dts: imx8mm-kontron: Set lower limit of VDD_SNVS to 800 mV
arm64: dts: imx8mm-kontron: Fix polarity of reg_rst_eth2
arm64: dts: imx8mm-kontron: Fix CAN SPI clock frequency
arm64: dts: imx8mm-kontron: Fix connection type for VSC8531 RGMII PHY
.../dts/freescale/imx8mm-kontron-n801x-s.dts | 36 ++++++++++++++++--- .../freescale/imx8mm-kontron-n801x-som.dtsi | 10 ++++-- 2 files changed, 39 insertions(+), 7 deletions(-)
Signature · 1 line
2.33.0
PATCH v2 1/6 arm64: dts: imx8mm-kontron: Add support for ultra high speed modes on SD card
From: Frieder Schrempf <[email protected]>
In order to use ultra high speed modes (UHS) on the SD card slot, we add matching pinctrls and fix the voltage switching for LDO5 of the PMIC, by providing the SD_VSEL pin as GPIO to the PMIC driver.
---
Changes in v2:
* Fix pinctrl node names to match bindings
--- .../dts/freescale/imx8mm-kontron-n801x-s.dts | 28 ++++++++++++++++++- .../freescale/imx8mm-kontron-n801x-som.dtsi | 2 ++ 2 files changed, 29 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts +27 -1
@@ -189,8 +189,10 @@ usbnet: usbether@1 { }; &usdhc2 { - pinctrl-names = "default"; + pinctrl-names = "default", "state_100mhz", "state_200mhz"; pinctrl-0 = <&pinctrl_usdhc2>; + pinctrl-1 = <&pinctrl_usdhc2_100mhz>; + pinctrl-2 = <&pinctrl_usdhc2_200mhz>; vmmc-supply = <®_vdd_3v3>; vqmmc-supply = <®_nvcc_sd>; cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
@@ -319,4 +321,28 @@ MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0 MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019 >; }; + + pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp { + fsl,pins = < + MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194 + MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4 + MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4 + MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4 + MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4 + MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4 + MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019 + >; + }; + + pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp { + fsl,pins = < + MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196 + MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6 + MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6 + MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6 + MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6 + MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6 + MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x019 + >; + }; };
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi +2 -0
@@ -86,6 +86,7 @@ pca9450: pmic@25 { pinctrl-0 = <&pinctrl_pmic>; interrupt-parent = <&gpio1>; interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + sd-vsel-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; regulators { reg_vdd_soc: BUCK1 {
@@ -226,6 +227,7 @@ MX8MM_IOMUXC_I2C1_SDA_I2C1_SDA 0x400001c3 pinctrl_pmic: pmicgrp { fsl,pins = < MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0 0x141 + MX8MM_IOMUXC_GPIO1_IO04_GPIO1_IO4 0x141 >; };
Signature · 1 line
2.33.0
PATCH v2 2/6 arm64: dts: imx8mm-kontron: Make sure SOC and DRAM supply voltages are correct
In reply to Frieder SchrempfFrom: Frieder Schrempf <[email protected]>
It looks like the voltages for the SOC and DRAM supply weren't properly validated before. The datasheet and uboot-imx code tells us that VDD_SOC should be 800 mV in suspend and 850 mV in run mode. VDD_DRAM should be 950 mV for DDR clock frequencies of up to 1.5 GHz.
Let's fix these values to make sure the voltages are within the required range.
---
Changes in v2:
* Fix the commit ref in the Fixes tag
* Improve commit message
--- arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi +4 -2
@@ -92,10 +92,12 @@ regulators { reg_vdd_soc: BUCK1 { regulator-name = "buck1"; regulator-min-microvolt = <800000>; - regulator-max-microvolt = <900000>; + regulator-max-microvolt = <850000>; regulator-boot-on; regulator-always-on; regulator-ramp-delay = <3125>; + nxp,dvs-run-voltage = <850000>; + nxp,dvs-standby-voltage = <800000>; }; reg_vdd_arm: BUCK2 {
@@ -112,7 +114,7 @@ reg_vdd_arm: BUCK2 { reg_vdd_dram: BUCK3 { regulator-name = "buck3"; regulator-min-microvolt = <850000>; - regulator-max-microvolt = <900000>; + regulator-max-microvolt = <950000>; regulator-boot-on; regulator-always-on; };
Signature · 1 line
2.33.0
PATCH v2 3/6 arm64: dts: imx8mm-kontron: Set lower limit of VDD_SNVS to 800 mV
In reply to Frieder SchrempfFrom: Frieder Schrempf <[email protected]>
According to the datasheet the typical value for VDD_SNVS should be 800 mV, so let's make sure that this is within the range of the regulator.
---
Changes in v2:
* Fix the commit ref in the Fixes tag
* Only set lower limit of regulator as upper limit matches range im datasheet.
--- arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi +1 -1
@@ -153,7 +153,7 @@ reg_nvcc_snvs: LDO1 { reg_vdd_snvs: LDO2 { regulator-name = "ldo2"; - regulator-min-microvolt = <850000>; + regulator-min-microvolt = <800000>; regulator-max-microvolt = <900000>; regulator-boot-on; regulator-always-on;
Signature · 1 line
2.33.0
PATCH v2 4/6 arm64: dts: imx8mm-kontron: Fix polarity of reg_rst_eth2
In reply to Frieder SchrempfFrom: Frieder Schrempf <[email protected]>
The regulator reg_rst_eth2 should keep the reset signal of the USB ethernet adapter deasserted anytime. Fix the polarity and mark it as always-on.
Anyway, using the regulator is only a workaround for the missing support of specifying a reset GPIO for USB devices in a generic way. As we don't have a solution for this at the moment, at least fix the current workaround.
---
Changes in v2:
* Fix the commit ref in the Fixes tag
* Improve commit message
* Remove useless change of uncontrolled reg_vdd_5v
--- arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts +3 -1
@@ -70,7 +70,9 @@ reg_rst_eth2: regulator-rst-eth2 { regulator-name = "rst-usb-eth2"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb_eth2>; - gpio = <&gpio3 2 GPIO_ACTIVE_LOW>; + gpio = <&gpio3 2 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; }; reg_vdd_5v: regulator-5v {
Signature · 1 line
2.33.0
PATCH v2 5/6 arm64: dts: imx8mm-kontron: Fix CAN SPI clock frequency
In reply to Frieder SchrempfFrom: Frieder Schrempf <[email protected]>
The MCP2515 can be used with an SPI clock of up to 10 MHz. Set the limit accordingly to prevent any performance issues caused by the really low clock speed of 100 kHz.
This removes the arbitrarily low limit on the SPI frequency, that was caused by a typo in the original dts.
Without this change, receiving CAN messages on the board beyond a certain bitrate will cause overrun errors (see 'ip -det -stat link show can0').
With this fix, receiving messages on the bus works without any overrun errors for bitrates up to 1 MBit.
---
Changes in v2:
* Fix the commit ref in the Fixes tag
* Improve commit message
--- arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts +1 -1
@@ -97,7 +97,7 @@ can0: can@0 { clocks = <&osc_can>; interrupt-parent = <&gpio4>; interrupts = <28 IRQ_TYPE_EDGE_FALLING>; - spi-max-frequency = <100000>; + spi-max-frequency = <10000000>; vdd-supply = <®_vdd_3v3>; xceiver-supply = <®_vdd_5v>; };
Signature · 1 line
2.33.0
PATCH v2 6/6 arm64: dts: imx8mm-kontron: Fix connection type for VSC8531 RGMII PHY
In reply to Frieder SchrempfFrom: Frieder Schrempf <[email protected]>
Previously we falsely relied on the PHY driver to unconditionally enable the internal RX delay. Since the following fix for the PHY driver this is not the case anymore:
commit 7b005a1742be ("net: phy: mscc: configure both RX and TX internal delays for RGMII")
In order to enable the delay we need to set the connection type to "rgmii-rxid". Without the RX delay the ethernet is not functional at all.
---
Changes in v2:
* Fix the commit ref in the Fixes tag
* Extend the commit message to make clear that ethernet is not working without this fix.
--- arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts +1 -1
@@ -113,7 +113,7 @@ &ecspi3 { &fec1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-connection-type = "rgmii"; + phy-connection-type = "rgmii-rxid"; phy-handle = <ðphy>; status = "okay";
Signature · 1 line
2.33.0
Shawn Guo
AppliedQuoted 11 lines · Frieder Schrempf
From: Frieder Schrempf <[email protected]>
This is a set of enhancements and fixes for the devicetrees of the Kontron SL/BL i.MX8MM SoMs and boards.
See the individual patches for more information and changelogs.
For v2, the review comments from Shawn ahve been taken into account (thanks!) and the patches 7 and 8 have been dropped, as they were already applied separately.
Quoted 9 lines
Frieder Schrempf (6):
arm64: dts: imx8mm-kontron: Add support for ultra high speed modes on
SD card
arm64: dts: imx8mm-kontron: Make sure SOC and DRAM supply voltages are
correct
arm64: dts: imx8mm-kontron: Set lower limit ofVDD_SNVSto 800 mV
arm64: dts: imx8mm-kontron: Fix polarity ofreg_rst_eth2
arm64: dts: imx8mm-kontron: Fix CAN SPI clock frequency
arm64: dts: imx8mm-kontron: Fix connection type for VSC8531 RGMII PHY
Applied all, thanks!