From: Frieder Schrempf <redacted>
This is a set of enhancements and fixes for the devicetrees of the Kontron
SL/BL i.MX8MM SoMs and boards.
Frieder Schrempf (8):
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 VDD_SNVS to 800 mV
arm64: dts: imx8mm-kontron: Fix reg_rst_eth2 and reg_vdd_5v regulators
arm64: dts: imx8mm-kontron: Fix CAN SPI clock frequency
arm64: dts: imx8mm-kontron: Fix connection type for VSC8531 RGMII PHY
arm64: dts: imx8mm-kontron: Fix reset delays for ethernet PHY
arm64: dts: imx8mm-kontron: Leave reg_vdd_arm always powered on
.../dts/freescale/imx8mm-kontron-n801x-s.dts | 41 ++++++++++++++++---
.../freescale/imx8mm-kontron-n801x-som.dtsi | 13 ++++--
2 files changed, 44 insertions(+), 10 deletions(-)
--
2.33.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Frieder Schrempf <redacted>
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.
Signed-off-by: Frieder Schrempf <redacted>
---
.../dts/freescale/imx8mm-kontron-n801x-s.dts | 28 ++++++++++++++++++-
.../freescale/imx8mm-kontron-n801x-som.dtsi | 2 ++
2 files changed, 29 insertions(+), 1 deletion(-)
From: Frieder Schrempf <redacted>
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 1.5 GHz.
This information is taken from the datasheet and the uboot-imx code.
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
From: Frieder Schrempf <redacted>
According to the datasheet VDD_SNVS should be 800 mV, so let's
make sure that the voltage won't be different.
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Frieder Schrempf <redacted>
The regulator reg_vdd_5v represents the fixed 5V supply on the board which
can't be switched off. Mark it as always-on.
The regulator reg_rst_eth2 should keep the reset signal of the USB ethernet
adapter deassertet anytime. Fix the polarity and mark it as always-on.
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
From: Frieder Schrempf <redacted>
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.
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Frieder Schrempf <redacted>
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".
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Frieder Schrempf <redacted>
According to the datasheet the VSC8531 PHY expects a reset pulse of 100 ns
and a delay of 15 ms after the reset has been deasserted. Set the matching
values in the devicetree.
Reported-by: Heiko Thiery <redacted>
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Frieder Schrempf <redacted>
When the cpufreq driver is enabled, the buck2 regulator is kept powered on
by the dependency between the CPU nodes with 'cpu-supply' set. Without the
cpufreq driver the kernel will power off the regulator as it doesn't see
any users. This is obviously not what we want, therefore keep the regulator
powered on in any case.
Reported-by: Heiko Thiery <redacted>
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi | 1 +
1 file changed, 1 insertion(+)
From: Frieder Schrempf <redacted>
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 1.5 GHz.
This information is taken from the datasheet and the uboot-imx code.
Signed-off-by: Frieder Schrempf <redacted>
This should also have:
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and
baseboards")
Cc: stable@vger.kernel.org
Hi Frieder,
Am Do., 30. Sept. 2021 um 17:57 Uhr schrieb Frieder Schrempf [off-list ref]:
From: Frieder Schrempf <redacted>
When the cpufreq driver is enabled, the buck2 regulator is kept powered on
by the dependency between the CPU nodes with 'cpu-supply' set. Without the
cpufreq driver the kernel will power off the regulator as it doesn't see
any users. This is obviously not what we want, therefore keep the regulator
powered on in any case.
Reported-by: Heiko Thiery <redacted>
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
On Thu, Sep 30, 2021 at 05:56:24PM +0200, Frieder Schrempf wrote:
quoted hunk
From: Frieder Schrempf <redacted>
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.
Signed-off-by: Frieder Schrempf <redacted>
---
.../dts/freescale/imx8mm-kontron-n801x-s.dts | 28 ++++++++++++++++++-
.../freescale/imx8mm-kontron-n801x-som.dtsi | 2 ++
2 files changed, 29 insertions(+), 1 deletion(-)
On Thu, Sep 30, 2021 at 06:02:01PM +0200, Frieder Schrempf wrote:
On 30.09.21 17:56, Frieder Schrempf wrote:
quoted
From: Frieder Schrempf <redacted>
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 1.5 GHz.
This information is taken from the datasheet and the uboot-imx code.
Signed-off-by: Frieder Schrempf <redacted>
This should also have:
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and
baseboards")
$ git log 21c4f45b335f
fatal: ambiguous argument '21c4f45b335f': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Shawn
On Thu, Sep 30, 2021 at 05:56:25PM +0200, Frieder Schrempf wrote:
From: Frieder Schrempf <redacted>
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 1.5 GHz.
This information is taken from the datasheet and the uboot-imx code.
I'm wondering where the existing settings were coming from?
Shawn
On Thu, Sep 30, 2021 at 05:56:27PM +0200, Frieder Schrempf wrote:
From: Frieder Schrempf <redacted>
The regulator reg_vdd_5v represents the fixed 5V supply on the board which
can't be switched off. Mark it as always-on.
The regulator reg_rst_eth2 should keep the reset signal of the USB ethernet
adapter deassertet anytime. Fix the polarity and mark it as always-on.
It seems to be wrong from the beginning that the reset is modelled by a
regulator.
quoted hunk
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
On Thu, Sep 30, 2021 at 05:56:28PM +0200, Frieder Schrempf wrote:
From: Frieder Schrempf <redacted>
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.
Could you share some testing result of this change?
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
It's really an optimization rather than fix, isn't it?
Shawn
On Thu, Sep 30, 2021 at 05:56:29PM +0200, Frieder Schrempf wrote:
From: Frieder Schrempf <redacted>
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".
Could you share some details of the issue that the delay is not enabled,
e.g. how broken the Ethernet support is without this change?
Shawn
quoted hunk
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
On Thu, Sep 30, 2021 at 05:56:31PM +0200, Frieder Schrempf wrote:
From: Frieder Schrempf <redacted>
When the cpufreq driver is enabled, the buck2 regulator is kept powered on
by the dependency between the CPU nodes with 'cpu-supply' set. Without the
cpufreq driver the kernel will power off the regulator as it doesn't see
any users. This is obviously not what we want, therefore keep the regulator
powered on in any case.
Reported-by: Heiko Thiery <redacted>
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
On Thu, Sep 30, 2021 at 05:56:25PM +0200, Frieder Schrempf wrote:
quoted
From: Frieder Schrempf <redacted>
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 1.5 GHz.
This information is taken from the datasheet and the uboot-imx code.
I'm wondering where the existing settings were coming from?
Good question, but I can't really retrace now how I actually determined
the values back then. Seems like I had failed to validate them properly.
On Thu, Sep 30, 2021 at 05:56:27PM +0200, Frieder Schrempf wrote:
quoted
From: Frieder Schrempf <redacted>
The regulator reg_vdd_5v represents the fixed 5V supply on the board which
can't be switched off. Mark it as always-on.
The regulator reg_rst_eth2 should keep the reset signal of the USB ethernet
adapter deassertet anytime. Fix the polarity and mark it as always-on.
It seems to be wrong from the beginning that the reset is modelled by a
regulator.
Right, but at least at the time when I upstreamed this, there was no way
to pass the reset GPIO to a USB device driver and using a regulator
seems to be an accepted workaround as far as I understand.
quoted
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
You do not have any on/off control over the regulator. So how does this
always-on property make any difference?
Right, this doesn't make a difference and is definitely not a fix, I
will drop it. Anyway, this regulator is just there for completeness of
the hardware description.
On Thu, Sep 30, 2021 at 05:56:28PM +0200, Frieder Schrempf wrote:
quoted
From: Frieder Schrempf <redacted>
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.
Could you share some testing result of this change?
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.
quoted
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
It's really an optimization rather than fix, isn't it?
It removes the arbitrarily low limit on the SPI frequency, that was
caused by a typo in the original dts. As the usage of the CAN bus is
seriously affected by this I would consider it a fix. But if you think
otherwise, feel free to remove the Fixes tag.
On Tue, Oct 05, 2021 at 03:10:14PM +0200, Frieder Schrempf wrote:
On 05.10.21 08:53, Shawn Guo wrote:
quoted
On Thu, Sep 30, 2021 at 05:56:25PM +0200, Frieder Schrempf wrote:
quoted
From: Frieder Schrempf <redacted>
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 1.5 GHz.
This information is taken from the datasheet and the uboot-imx code.
I'm wondering where the existing settings were coming from?
Good question, but I can't really retrace now how I actually determined
the values back then. Seems like I had failed to validate them properly.
Please update commit log with these background info.
Shawn
Thanks for the link!
But datasheet specifies a voltage range. 800 mV is just the typical one.
The only problem I see is that regulator-min-microvolt should be lowered
to 800 mV. regulator-max-microvolt looks correct to me.
Shawn
quoted
quoted
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-som.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
On Tue, Oct 05, 2021 at 07:06:57PM +0200, Frieder Schrempf wrote:
On 05.10.21 09:09, Shawn Guo wrote:
quoted
On Thu, Sep 30, 2021 at 05:56:27PM +0200, Frieder Schrempf wrote:
quoted
From: Frieder Schrempf <redacted>
The regulator reg_vdd_5v represents the fixed 5V supply on the board which
can't be switched off. Mark it as always-on.
The regulator reg_rst_eth2 should keep the reset signal of the USB ethernet
adapter deassertet anytime. Fix the polarity and mark it as always-on.
It seems to be wrong from the beginning that the reset is modelled by a
regulator.
Right, but at least at the time when I upstreamed this, there was no way
to pass the reset GPIO to a USB device driver and using a regulator
seems to be an accepted workaround as far as I understand.
Do we have the solution in usb driver now? If so, we should probably
switch to that, instead of patching the workaround?
Shawn
quoted
quoted
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
You do not have any on/off control over the regulator. So how does this
always-on property make any difference?
Right, this doesn't make a difference and is definitely not a fix, I
will drop it. Anyway, this regulator is just there for completeness of
the hardware description.
On Tue, Oct 05, 2021 at 07:17:13PM +0200, Frieder Schrempf wrote:
On 05.10.21 09:12, Shawn Guo wrote:
quoted
On Thu, Sep 30, 2021 at 05:56:28PM +0200, Frieder Schrempf wrote:
quoted
From: Frieder Schrempf <redacted>
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.
Could you share some testing result of this change?
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.
quoted
quoted
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
It's really an optimization rather than fix, isn't it?
It removes the arbitrarily low limit on the SPI frequency, that was
caused by a typo in the original dts. As the usage of the CAN bus is
seriously affected by this I would consider it a fix. But if you think
otherwise, feel free to remove the Fixes tag.
Put all these good information into commit log, and I will be happy to
take it as a fix.
Shawn
On Thu, Sep 30, 2021 at 05:56:24PM +0200, Frieder Schrempf wrote:
quoted
From: Frieder Schrempf <redacted>
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.
Signed-off-by: Frieder Schrempf <redacted>
---
.../dts/freescale/imx8mm-kontron-n801x-s.dts | 28 ++++++++++++++++++-
.../freescale/imx8mm-kontron-n801x-som.dtsi | 2 ++
2 files changed, 29 insertions(+), 1 deletion(-)
On Tue, Oct 05, 2021 at 07:06:57PM +0200, Frieder Schrempf wrote:
quoted
On 05.10.21 09:09, Shawn Guo wrote:
quoted
On Thu, Sep 30, 2021 at 05:56:27PM +0200, Frieder Schrempf wrote:
quoted
From: Frieder Schrempf <redacted>
The regulator reg_vdd_5v represents the fixed 5V supply on the board which
can't be switched off. Mark it as always-on.
The regulator reg_rst_eth2 should keep the reset signal of the USB ethernet
adapter deassertet anytime. Fix the polarity and mark it as always-on.
It seems to be wrong from the beginning that the reset is modelled by a
regulator.
Right, but at least at the time when I upstreamed this, there was no way
to pass the reset GPIO to a USB device driver and using a regulator
seems to be an accepted workaround as far as I understand.
Do we have the solution in usb driver now? If so, we should probably
switch to that, instead of patching the workaround?
I had a look, but couldn't find anything. I remember there have been
efforts in the past to provide a generic way for usb devices to manage
resources like reset GPIOs and clocks (e.g. [1]), but it seems like
nothing of this ever got merged.
So for the moment I'd like to fix the existing solution, but I totally
agree that this should be solved properly in the future.
[1] https://lkml.org/lkml/2017/6/21/90
quoted
quoted
quoted
Fixes: 21c4f45b335f ("arm64: dts: Add the Kontron i.MX8M Mini SoMs and baseboards")
Cc: stable@vger.kernel.org
Signed-off-by: Frieder Schrempf <redacted>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
You do not have any on/off control over the regulator. So how does this
always-on property make any difference?
Right, this doesn't make a difference and is definitely not a fix, I
will drop it. Anyway, this regulator is just there for completeness of
the hardware description.