Kontron i.MX8MP OSM Devicetree Fixups
Subsystems (2)
cover Kontron i.MX8MP OSM Devicetree Fixups
From: Frieder Schrempf <[email protected]>
This contains three fixes and one cosmetic change for the Kontron i.MX8MP OSM devices.
Annette Kobou (1):
arm64: dts: imx8mp-kontron: Fix boot order for PMIC and RTC
Frieder Schrempf (3):
arm64: dts: imx8mp-kontron: Fix touch reset configuration on DL
devices
arm64: dts: imx8mp-kontron: Fix SD card supply on SMARC eval carrier
arm64: dts: imx8mp-kontron: Use GPIO/IRQ defines in DL devicetree
.../boot/dts/freescale/imx8mp-kontron-dl.dtso | 26 ++++++++++++++++--- .../dts/freescale/imx8mp-kontron-osm-s.dtsi | 6 +++++ .../imx8mp-kontron-smarc-eval-carrier.dts | 1 - 3 files changed, 29 insertions(+), 4 deletions(-)
Signature · 1 line
2.52.0
PATCH 1/4 arm64: dts: imx8mp-kontron: Fix touch reset configuration on DL devices
From: Frieder Schrempf <[email protected]>
The reset signal needs a pullup, but there is no hardware pullup. As a workaround, enable the internal pullup to fix the touchscreen.
As this deviates from the default generic GPIO settings in the OSM devicetree, add a new node for the touch pinctrl and redefine the generic gpio1 pinctrl.
--- .../boot/dts/freescale/imx8mp-kontron-dl.dtso | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-kontron-dl.dtso +19 -0
@@ -77,6 +77,8 @@ &i2c1 { touchscreen@5d { compatible = "goodix,gt928"; reg = <0x5d>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_touch>; interrupt-parent = <&gpio1>; interrupts = <6 8>; irq-gpios = <&gpio1 6 0>;
@@ -98,6 +100,16 @@ &lvds_bridge { status = "okay"; }; +/* redefine to remove touch controller GPIOs */ +&pinctrl_gpio1 { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO00__GPIO1_IO00 0x19 /* GPIO_A_0 */ + MX8MP_IOMUXC_GPIO1_IO01__GPIO1_IO01 0x19 /* GPIO_A_1 */ + MX8MP_IOMUXC_GPIO1_IO05__GPIO1_IO05 0x19 /* GPIO_A_2 */ + MX8MP_IOMUXC_GPIO1_IO08__GPIO1_IO08 0x19 /* GPIO_A_5 */ + >; +}; + &pwm1 { status = "okay"; };
@@ -108,4 +120,11 @@ pinctrl_panel_stby: panelstbygrp { MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0x19 >; }; + + pinctrl_touch: touchgrp { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO06__GPIO1_IO06 0x19 + MX8MP_IOMUXC_GPIO1_IO07__GPIO1_IO07 0x150 + >; + }; };
Signature · 1 line
2.52.0
PATCH 3/4 arm64: dts: imx8mp-kontron: Fix boot order for PMIC and RTC
In reply to Frieder SchrempfFrom: Annette Kobou <[email protected]>
The PMIC provides a level-shifter for the I2C lines to the RTC. As the level shifter needs to be enabled before the RTC can be accessed, we need to make sure that the PMIC driver is probed first.
As the PMIC also provides the supply voltage for the RTC through the 3.3V regulator, we can simply express this in the DT to create the required dependency.
This fixes sporadic boot hangs that occurred when the RTC was accessed before the level-shifter was enabled.
--- arch/arm64/boot/dts/freescale/imx8mp-kontron-osm-s.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-kontron-osm-s.dtsi +6 -0
@@ -330,6 +330,12 @@ rv3028: rtc@52 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_rtc>; interrupts-extended = <&gpio3 24 IRQ_TYPE_LEVEL_LOW>; + /* + * While specifying the vdd-supply is normally not strictly necessary, + * here it also makes sure that the PMIC driver enables the level- + * shifter for the RTC before the RTC is probed. + */ + vdd-supply = <®_vdd_3v3>; }; };
Signature · 1 line
2.52.0
PATCH 2/4 arm64: dts: imx8mp-kontron: Fix SD card supply on SMARC eval carrier
In reply to Frieder SchrempfFrom: Frieder Schrempf <[email protected]>
The SMARC eval carrier has a power switch for the SD card compliant to the OSM standard definition. To use this as already specified in the OSM base devicetree, stop overriding it in the board tree.
This fixes the power-supply for the SC card.
--- .../boot/dts/freescale/imx8mp-kontron-smarc-eval-carrier.dts | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mp-kontron-smarc-eval-carrier.dts +0 -1
@@ -249,6 +249,5 @@ &usb3_phy1 { }; &usdhc2 { - vmmc-supply = <®_vdd_3v3>; status = "okay"; };
Signature · 1 line
2.52.0
PATCH 4/4 arm64: dts: imx8mp-kontron: Use GPIO/IRQ defines in DL devicetree
In reply to Frieder SchrempfFrom: Frieder Schrempf <[email protected]>
To make the code more readable, use the macros for the GPIO and IRQ settings.
--- arch/arm64/boot/dts/freescale/imx8mp-kontron-dl.dtso | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-kontron-dl.dtso +4 -3
@@ -7,6 +7,7 @@ /plugin/; #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> #include "imx8mp-pinfunc.h" &{/} {
@@ -80,11 +81,11 @@ touchscreen@5d { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_touch>; interrupt-parent = <&gpio1>; - interrupts = <6 8>; - irq-gpios = <&gpio1 6 0>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>; + irq-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; AVDD28-supply = <®_vcc_panel>; VDDIO-supply = <®_vcc_panel>; - reset-gpios = <&gpio1 7 0>; + reset-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; }; };
Signature · 1 line
2.52.0
Re: [PATCH 1/4] arm64: dts: imx8mp-kontron: Fix touch reset configuration on DL devices
In reply to Frieder SchrempfQuoted 5 lines · Frieder Schrempf
From: Frieder Schrempf <[email protected]>
The reset signal needs a pullup, but there is no hardware pullup. As a workaround, enable the internal pullup to fix the touchscreen.
Quoted 7 lines
As this deviates from the default generic GPIO settings in the OSM devicetree, add a new node for the touch pinctrl and redefine the generic gpio1 pinctrl.
Fixes 946ab10e3f40f ("arm64: dts: Add support for Kontron OSM-S i.MX8MP SoM and BL carrier board")Signed-off-by Frieder Schrempf <[email protected]>---
Quoted 48 lines
.../boot/dts/freescale/imx8mp-kontron-dl.dtso | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)arch/arm64/boot/dts/freescale/imx8mp-kontron-dl.dtso +19
-1@@ -77,6 +77,8 @@ &i2c1 { touchscreen@5d { compatible = "goodix,gt928"; reg = <0x5d>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_touch>; interrupt-parent = <&gpio1>; interrupts = <6 8>; irq-gpios = <&gpio1 6 0>;@@ -98,6 +100,16 @@ &lvds_bridge { status = "okay"; }; +/* redefine to remove touch controller GPIOs */ +&pinctrl_gpio1 { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO00__GPIO1_IO00 0x19 /* GPIO_A_0 */ + MX8MP_IOMUXC_GPIO1_IO01__GPIO1_IO01 0x19 /* GPIO_A_1 */ + MX8MP_IOMUXC_GPIO1_IO05__GPIO1_IO05 0x19 /* GPIO_A_2 */ + MX8MP_IOMUXC_GPIO1_IO08__GPIO1_IO08 0x19 /* GPIO_A_5 */ + >; +}; + &pwm1 { status = "okay"; };@@ -108,4 +120,11 @@ pinctrl_panel_stby: panelstbygrp { MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0x19 >; }; + + pinctrl_touch: touchgrp { + fsl,pins = < + MX8MP_IOMUXC_GPIO1_IO06__GPIO1_IO06 0x19 + MX8MP_IOMUXC_GPIO1_IO07__GPIO1_IO07 0x150 + >; + }; }; --2.52.0
Frank Li
maintainerRe: [PATCH 2/4] arm64: dts: imx8mp-kontron: Fix SD card supply on SMARC eval carrier
In reply to Frieder SchrempfQuoted 7 lines · Frieder Schrempf
From: Frieder Schrempf <[email protected]>
The SMARC eval carrier has a power switch for the SD card compliant to the OSM standard definition. To use this as already specified in the OSM base devicetree, stop overriding it in the board tree.
This fixes the power-supply for the SC card.
Is below commit better?
ARM: dts: imx8mp-sm2s-imx8mp: Drop SD power-supply override
The SMARC evaluation carrier provides an SD card power switch that complies with the OSM standard definition. The OSM base device tree already describes this correctly.
Stop overriding the SD power-supply in the board device tree and rely on the definition from the OSM base DTS instead to fix the power-supply configuration for the SD card.
Quoted 21 lines
Fixes 6fe1ced5ccab7 ("arm64: dts: Add support for Kontron i.MX8MP SMARC module and eval carrier")Signed-off-by Frieder Schrempf <[email protected]>--- .../boot/dts/freescale/imx8mp-kontron-smarc-eval-carrier.dts | 1 - 1 file changed, 1 deletion(-)arch/arm64/boot/dts/freescale/imx8mp-kontron-smarc-eval-carrier.dts +0
-2@@ -249,6 +249,5 @@ &usb3_phy1 { }; &usdhc2 { - vmmc-supply = <®_vdd_3v3>; status = "okay"; }; --2.52.0
Frank Li
maintainerRe: [PATCH 3/4] arm64: dts: imx8mp-kontron: Fix boot order for PMIC and RTC
In reply to Frieder SchrempfQuoted 26 lines · Frieder Schrempf
From: Annette Kobou <[email protected]>
The PMIC provides a level-shifter for the I2C lines to the RTC. As the level shifter needs to be enabled before the RTC can be accessed, we need to make sure that the PMIC driver is probed first.
As the PMIC also provides the supply voltage for the RTC through the 3.3V regulator, we can simply express this in the DT to create the required dependency.
This fixes sporadic boot hangs that occurred when the RTC was accessed before the level-shifter was enabled.
Fixes 946ab10e3f40f ("arm64: dts: Add support for Kontron OSM-S i.MX8MP SoM and BL carrier board")Signed-off-by Annette Kobou <[email protected]>Signed-off-by Frieder Schrempf <[email protected]>--- arch/arm64/boot/dts/freescale/imx8mp-kontron-osm-s.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm64/boot/dts/freescale/imx8mp-kontron-osm-s.dtsi +0
-0
arch/arm64/boot/dts/freescale/imx8mp-kontron-osm-s.dtsi rv3028: rtc@52 { · line 338
Quoted 9 lines
arch/arm64/boot/dts/freescale/imx8mp-kontron-osm-s.dtsi +6
-0@@ -330,6 +330,12 @@ rv3028: rtc@52 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_rtc>; interrupts-extended = <&gpio3 24 IRQ_TYPE_LEVEL_LOW>; + /* + * While specifying the vdd-supply is normally not strictly necessary, + * here it also makes sure that the PMIC driver enables the level- + * shifter for the RTC before the RTC is probed. + */ + vdd-supply = <®_vdd_3v3>;
Dose reg_vdd_3v3 controller by gpio, or actually it is level shifter?
Frank
Quoted 6 lines
arch/arm64/boot/dts/freescale/imx8mp-kontron-osm-s.dtsi +0
-1}; }; --2.52.0
Re: [PATCH 4/4] arm64: dts: imx8mp-kontron: Use GPIO/IRQ defines in DL devicetree
In reply to Frieder SchrempfQuoted 7 lines · Frieder Schrempf
From: Frieder Schrempf <[email protected]>
To make the code more readable, use the macros for the GPIO and IRQ settings.
Signed-off-by Frieder Schrempf <[email protected]>---
Quoted 33 lines
arch/arm64/boot/dts/freescale/imx8mp-kontron-dl.dtso | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)arch/arm64/boot/dts/freescale/imx8mp-kontron-dl.dtso +4
-4@@ -7,6 +7,7 @@ /plugin/; #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> #include "imx8mp-pinfunc.h" &{/} {@@ -80,11 +81,11 @@ touchscreen@5d { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_touch>; interrupt-parent = <&gpio1>; - interrupts = <6 8>; - irq-gpios = <&gpio1 6 0>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>; + irq-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; AVDD28-supply = <®_vcc_panel>; VDDIO-supply = <®_vcc_panel>; - reset-gpios = <&gpio1 7 0>; + reset-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; }; }; --2.52.0
Re: [PATCH 2/4] arm64: dts: imx8mp-kontron: Fix SD card supply on SMARC eval carrier
In reply to Frank LiHi Frank,
Quoted 10 lines · Frank Li
Quoted 7 lines · Frieder Schrempf
From: Frieder Schrempf <[email protected]>
The SMARC eval carrier has a power switch for the SD card compliant to the OSM standard definition. To use this as already specified in the OSM base devicetree, stop overriding it in the board tree.
This fixes the power-supply for the SC card.
Is below commit better?
Do you mean "commit message"?
Did you run my message through a LLM to enhance it and now feed it back to me?
If yes, it is a very strange way to waste GPU cycles and developer time.
Quoted 2 lines
ARM: dts: imx8mp-sm2s-imx8mp: Drop SD power-supply override
The subject line is completely wrong.
Quoted 8 lines
The SMARC evaluation carrier provides an SD card power switch that complies with the OSM standard definition. The OSM base device tree already describes this correctly.
Stop overriding the SD power-supply in the board device tree and rely on the definition from the OSM base DTS instead to fix the power-supply configuration for the SD card.
Ok, maybe this rephrasing is slightly better to read, but again: is this really worth the efforts? And it doesn't even correct my mistake of using either 'vmmc-supply' to refer to the property or "power supply" without a dash.
Thanks
Frieder
Quoted 22 lines
Quoted 22 lines
Fixes 6fe1ced5ccab7 ("arm64: dts: Add support for Kontron i.MX8MP SMARC module and eval carrier")Signed-off-by Frieder Schrempf <[email protected]>--- .../boot/dts/freescale/imx8mp-kontron-smarc-eval-carrier.dts | 1 - 1 file changed, 1 deletion(-)arch/arm64/boot/dts/freescale/imx8mp-kontron-smarc-eval-carrier.dts +0
-2@@ -249,6 +249,5 @@ &usb3_phy1 { }; &usdhc2 { - vmmc-supply = <®_vdd_3v3>; status = "okay"; }; --2.52.0
Re: [PATCH 3/4] arm64: dts: imx8mp-kontron: Fix boot order for PMIC and RTC
In reply to Frank LiQuoted 22 lines · Frank Li
Quoted 21 lines · Frieder Schrempf
From: Annette Kobou <[email protected]>
The PMIC provides a level-shifter for the I2C lines to the RTC. As the level shifter needs to be enabled before the RTC can be accessed, we need to make sure that the PMIC driver is probed first.
As the PMIC also provides the supply voltage for the RTC through the 3.3V regulator, we can simply express this in the DT to create the required dependency.
This fixes sporadic boot hangs that occurred when the RTC was accessed before the level-shifter was enabled.
Fixes 946ab10e3f40f ("arm64: dts: Add support for Kontron OSM-S i.MX8MP SoM and BL carrier board")Signed-off-by Annette Kobou <[email protected]>Signed-off-by Frieder Schrempf <[email protected]>--- arch/arm64/boot/dts/freescale/imx8mp-kontron-osm-s.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
Quoted 16 lines
Quoted 5 lines
arch/arm64/boot/dts/freescale/imx8mp-kontron-osm-s.dtsi +0
-0arch/arm64/boot/dts/freescale/imx8mp-kontron-osm-s.dtsi rv3028: rtc@52 { · line 338
Quoted 9 lines
arch/arm64/boot/dts/freescale/imx8mp-kontron-osm-s.dtsi +6
-0@@ -330,6 +330,12 @@ rv3028: rtc@52 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_rtc>; interrupts-extended = <&gpio3 24 IRQ_TYPE_LEVEL_LOW>; + /* + * While specifying the vdd-supply is normally not strictly necessary, + * here it also makes sure that the PMIC driver enables the level- + * shifter for the RTC before the RTC is probed. + */ + vdd-supply = <®_vdd_3v3>;Dose
reg_vdd_3v3controller by gpio, or actually it is level shifter?
As I explained in the commit message, reg_vdd_3v3 is a regulator provided by the PCA9450 PMIC that feeds the RTC.
At the same time the PCA9450 PMIC also provides a level-shifter that is used to bring the I2C data lines to the correct level for the RTC.
Frank Li
maintainerRe: [PATCH 2/4] arm64: dts: imx8mp-kontron: Fix SD card supply on SMARC eval carrier
In reply to Frieder SchrempfQuoted 12 lines · Frieder Schrempf
Hi Frank,
Quoted 9 lines · Frank Li
Quoted 7 lines · Frieder Schrempf
From: Frieder Schrempf <[email protected]>
The SMARC eval carrier has a power switch for the SD card compliant to the OSM standard definition. To use this as already specified in the OSM base devicetree, stop overriding it in the board tree.
This fixes the power-supply for the SC card.
Quoted 8 lines
Quoted 1 line
Is below commit better?
Do you mean "commit message"?
Did you run my message through a LLM to enhance it and now feed it back to me?
If yes, it is a very strange way to waste GPU cycles and developer time.
I used LLM for some unsatisfied commit message with LLM. I need make sure other reviewers can understand the commit message easily and commit message align submit-patch requirement before I can pick up it.
It is not waste GPU, which already found many problem although there are some false alarm.
Quoted 5 lines
Quoted 3 lines
ARM: dts: imx8mp-sm2s-imx8mp: Drop SD power-supply override
The subject line is completely wrong.
sorry for typo 'power-supply', it should be 'mmc-supply'
subject should be "do (what) to"
drop vmmc-supply to fix ... or
drop vmmc-supply because it is already in base devicetree
Quoted 6 lines
Quoted 6 lines
The SMARC evaluation carrier provides an SD card power switch that complies with the OSM standard definition. The OSM base device tree already describes this correctly.
Quoted 8 lines
Quoted 3 lines
Stop overriding the SD power-supply in the board device tree and rely on the definition from the OSM base DTS instead to fix the power-supply configuration for the SD card.
Ok, maybe this rephrasing is slightly better to read, but again: is this really worth the efforts? And it doesn't even correct my mistake of using either 'vmmc-supply' to refer to the property or "power supply" without a dash.
Sorry for typo,
Frank
Quoted 27 lines
Thanks
FriederQuoted 22 lines
Quoted 22 lines
Fixes 6fe1ced5ccab7 ("arm64: dts: Add support for Kontron i.MX8MP SMARC module and eval carrier")Signed-off-by Frieder Schrempf <[email protected]>--- .../boot/dts/freescale/imx8mp-kontron-smarc-eval-carrier.dts | 1 - 1 file changed, 1 deletion(-)arch/arm64/boot/dts/freescale/imx8mp-kontron-smarc-eval-carrier.dts +0
-2@@ -249,6 +249,5 @@ &usb3_phy1 { }; &usdhc2 { - vmmc-supply = <®_vdd_3v3>; status = "okay"; }; --2.52.0
Re: [PATCH 2/4] arm64: dts: imx8mp-kontron: Fix SD card supply on SMARC eval carrier
Quoted 20 lines · Frank Li
Quoted 19 lines · Frieder Schrempf
Hi Frank,
Quoted 10 lines · Frank Li
Quoted 7 lines · Frieder Schrempf
From: Frieder Schrempf <[email protected]>
The SMARC eval carrier has a power switch for the SD card compliant to the OSM standard definition. To use this as already specified in the OSM base devicetree, stop overriding it in the board tree.
This fixes the power-supply for the SC card.
Is below commit better?
Do you mean "commit message"?
Did you run my message through a LLM to enhance it and now feed it back to me?
Quoted 8 lines
Quoted 1 line
If yes, it is a very strange way to waste GPU cycles and developer time.
I used LLM for some unsatisfied commit message with LLM. I need make sure other reviewers can understand the commit message easily and commit message align submit-patch requirement before I can pick up it.
It is not waste GPU, which already found many problem although there are some false alarm.
So I don't follow you on calling my original commit message "unsatisfying", not understandable and not compliant with patch submission requirements. On the contrary, I think it's fine, maybe not perfect, but it should be sufficient.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
ARM: dts: imx8mp-sm2s-imx8mp: Drop SD power-supply override
If you still think you need to enhance the commit message and use a LLM for that, I won't stop you. But please, for the sake of an efficient patch review process, check the output before you post the feedback.
Did you realize that the subject line you proposed above is using the wrong prefix? And that the LLM hallucinated a non-existing board name "imx8mp-sm2s-imx8mp"?
These things were correct in my original submission. So your proposal makes things worse and not better because you run an LLM over the commit message and then just post the output unverified back to me.
Two things to always do when using LLMs:
1. Verify the output before you do anything with it
2. If you share the output, make it clear that it comes from a LLM
It's so annoying to expect qualified human feedback and then find unqualified and unverified LLM feedback. If I wanted the LLM to write my commit message, I could let it do it myself.
Quoted 9 lines
Quoted 2 lines
The subject line is completely wrong.
sorry for typo 'power-supply', it should be 'mmc-supply'
subject should be "do (what) to"
drop vmmc-supply to fix ... or
drop vmmc-supply because it is already in base devicetree
Ok, got it, thanks. You're still missing the point here.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
The SMARC evaluation carrier provides an SD card power switch that complies with the OSM standard definition. The OSM base device tree already describes this correctly.
Stop overriding the SD power-supply in the board device tree and rely on the definition from the OSM base DTS instead to fix the power-supply configuration for the SD card.
Quoted 6 lines
Quoted 4 lines
Ok, maybe this rephrasing is slightly better to read, but again: is this really worth the efforts? And it doesn't even correct my mistake of using either 'vmmc-supply' to refer to the property or "power supply" without a dash.
Sorry for typo,
Again, that's not the main point. It's the whole process that annoys me as I explained above.
Anyway, let's stop arguing here. I will send out a v2 with an improved subject and commit message.