Skip to contentSkip to conversation

dts updates and fixes for Khadas VIM1 VIM2 VIM3 VIML boards

PATCH In review Artem Lapkin 4 participants 23 messages Sep 25, 2020 – Sep 28, 2020 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover dts updates and fixes for Khadas VIM1 VIM2 VIM3 VIML boards

dts updates and fixes for Khadas VIM1 VIM2 VIM3 VIML boards

Artem Lapkin (8):
arm64: dts: meson: update spifc node on Khadas VIM2
meson-gxm-khadas-vim2
arm64: dts: meson: update leds node on Khadas VIM3/VIM3L boards
meson-khadas-vim3
arm64: dts: meson: update leds node on Khadas VIM3/VIM3L board
meson-khadas-vim3
arm64: dts: meson: remove fixed memory size for Khadas VIM3/VIM3L
meson-khadas-vim3
arm64: dts: meson: remove reset-gpios from ethernet node for VIM2
meson-gxm-khadas-vim2
arm64: dts: meson: disable vrtc for VIM3L boards meson-khadas-vim3
arm64: dts: meson: enable RTC for VIM1 meson-gxl-s905x-khadas-vim
arm64: dts: meson: enable RTC for VIM2 meson-gxm-khadas-vim2

 .../amlogic/meson-gxl-s905x-khadas-vim.dts    |  2 +-
 .../dts/amlogic/meson-gxm-khadas-vim2.dts     | 10 +++++-----
 .../boot/dts/amlogic/meson-khadas-vim3.dtsi   | 19 +++++++++++++++----
 3 files changed, 21 insertions(+), 10 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/8 arm64: dts: meson: update spifc node on Khadas VIM2 meson-gxm-khadas-vim2

1) The VIM2 Boards use w25q128 spi chip only not w25q32 or w25q16 it's not really seriously becouse have 'jedec,spi-nor' which have auto chips identifications

2) max-frequency is 104Mhz

---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +3 -3
index bff8ec2c1c7..a6baf865aa2 100644
@@ -336,12 +336,12 @@ &spifc {
 	pinctrl-0 = <&nor_pins>;
 	pinctrl-names = "default";
 
-	w25q32: spi-flash@0 {
+	w25q128: spi-flash@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		compatible = "winbond,w25q16", "jedec,spi-nor";
+		compatible = "winbond,w25q128fw", "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <3000000>;
+		spi-max-frequency = <104000000>;
 	};
 };
 
Signature · 1 line
2.25.1
Reviewed-by on v1 1/8
#2 lore raw

Re: [PATCH 1/8] arm64: dts: meson: update spifc node on Khadas VIM2 meson-gxm-khadas-vim2

Quoted 22 lines · Artem Lapkin

1) The VIM2 Boards use w25q128 spi chip only not w25q32 or w25q16 it's not really seriously becouse have 'jedec,spi-nor' which have auto chips identifications

2) max-frequency is 104Mhz

---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +1 -1
index bff8ec2c1c7..a6baf865aa2 100644
@@ -336,12 +336,12 @@ &spifc {
 	pinctrl-0 = <&nor_pins>;
 	pinctrl-names = "default";
 
-	w25q32: spi-flash@0 {
+	w25q128: spi-flash@0 {

arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts &spifc { · line 347

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +2 -2
 		#address-cells = <1>;
 		#size-cells = <1>;
-		compatible = "winbond,w25q16", "jedec,spi-nor";
+		compatible = "winbond,w25q128fw", "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <3000000>;
+		spi-max-frequency = <104000000>;
 	};
 };
 
#3 lore raw

Re: [PATCH 1/8] arm64: dts: meson: update spifc node on Khadas VIM2 meson-gxm-khadas-vim2

In reply to Artem Lapkin

Hi Artem,

Quoted 4 lines · Artem Lapkin

1) The VIM2 Boards use w25q128 spi chip only not w25q32 or w25q16 it's not really seriously becouse have 'jedec,spi-nor' which have auto chips identifications

according to the "VIM2 - Transitioning From v1.2 to v1.4" document [0] (page 7) both board revisions are using different SPI flash sizes for which board revision are your changes?

Quoted 1 line

2) max-frequency is 104Mhz

(note to self: according to the w25q16 datasheet it supports a maximum clock frequency of 104MHz, so this is fine)

Best regards,
Martin

#4 lore raw

Re: [PATCH 1/8] arm64: dts: meson: update spifc node on Khadas VIM2 meson-gxm-khadas-vim2

Quoted 10 lines · Martin Blumenstingl

Hi Artem,

Quoted 4 lines · Artem Lapkin

1) The VIM2 Boards use w25q128 spi chip only not w25q32 or w25q16 it's not really seriously becouse have 'jedec,spi-nor' which have auto chips identifications

according to the "VIM2 - Transitioning From v1.2 to v1.4" document [0] (page 7) both board revisions are using different SPI flash sizes for which board revision are your changes?

Indeed, if you changed the flash for the v14 VIM2 board, please:
- move arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts into meson-gxm-khadas-vim2.dtsi leaving only the root compatible, model and the v12 spi flash model&size into the meson-gxm-khadas-vim2.dts file
- add "khadas,vim2-v14" to amlogic board bindings
- introduce a arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2-v14.dts file adding the changes (spi flash change, MCU) with a different root compatible & model

Neil

Quoted 9 lines
Quoted 2 lines

2) max-frequency is 104Mhz

(note to self: according to the w25q16 datasheet it supports a maximum clock frequency of 104MHz, so this is fine)

Best regards,
Martin

#5 lore raw

PATCH 2/8 arm64: dts: meson: update leds node on Khadas VIM3/VIM3L boards meson-khadas-vim3

In reply to Artem Lapkin

GPIO_ACTIVE_LOW replaced to GPIO_ACTIVE_HIGH for white and red leds

---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +2 -2
index 94f75b44650..73783692e30 100644
@@ -41,13 +41,13 @@ leds {
 
 		led-white {
 			label = "vim3:white:sys";
-			gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "heartbeat";
 		};
 
 		led-red {
 			label = "vim3:red";
-			gpios = <&gpio_expander 5 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio_expander 5 GPIO_ACTIVE_HIGH>;
 		};
 	};
 
Signature · 1 line
2.25.1
#6 lore raw

Re: [PATCH 2/8] arm64: dts: meson: update leds node on Khadas VIM3/VIM3L boards meson-khadas-vim3

Quoted 18 lines · Artem Lapkin

GPIO_ACTIVE_LOW replaced to GPIO_ACTIVE_HIGH for white and red leds

---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +1 -1
index 94f75b44650..73783692e30 100644
@@ -41,13 +41,13 @@ leds {
 
 		led-white {
 			label = "vim3:white:sys";
-			gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;

arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi leds { · line 53

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +1 -1
 			linux,default-trigger = "heartbeat";
 		};
 
 		led-red {
 			label = "vim3:red";
-			gpios = <&gpio_expander 5 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio_expander 5 GPIO_ACTIVE_HIGH>;
 		};
 	};
 

This has already been fixed and applied for 5.10:
https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic.git/commit/?h=v5.10/dt64&id=1f9d87d08e4a2299e86f8a1600aedf87ecd3b636

Neil

#7 lore raw

PATCH 3/8 arm64: dts: meson: update leds node on Khadas VIM3/VIM3L board meson-khadas-vim3

In reply to Artem Lapkin

add aliases names led_white and led_red for white and red leds

---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +4 -2
index 73783692e30..7e137399257 100644
@@ -12,6 +12,8 @@ / {
 	aliases {
 		serial0 = &uart_AO;
 		ethernet0 = &ethmac;
+		led_red = &led_red;
+		led_white = &led_white;
 	};
 
 	chosen {
@@ -39,13 +41,13 @@ button-function {
 	leds {
 		compatible = "gpio-leds";
 
-		led-white {
+		led_white: led-white {
 			label = "vim3:white:sys";
 			gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "heartbeat";
 		};
 
-		led-red {
+		led_red: led-red {
 			label = "vim3:red";
 			gpios = <&gpio_expander 5 GPIO_ACTIVE_HIGH>;
 		};
Signature · 1 line
2.25.1
#8 lore raw

Re: [PATCH 3/8] arm64: dts: meson: update leds node on Khadas VIM3/VIM3L board meson-khadas-vim3

Hi,

Quoted 1 line · Artem Lapkin

add aliases names led_white and led_red for white and red leds

Sorry, can you explain why you need these ? They should not be used by the led framework.

Quoted 11 lines
---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +0 -0
index 73783692e30..7e137399257 100644

arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi / { · line 16

Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +2 -0
@@ -12,6 +12,8 @@ / {
 	aliases {
 		serial0 = &uart_AO;
 		ethernet0 = &ethmac;
+		led_red = &led_red;
+		led_white = &led_white;

These aliases are not standard aliases.

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +1 -1
 	};
 
 	chosen {
@@ -39,13 +41,13 @@ button-function {
 	leds {
 		compatible = "gpio-leds";
 
-		led-white {
+		led_white: led-white {

arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi button-function { · line 53

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +1 -1
 			label = "vim3:white:sys";
 			gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "heartbeat";
 		};
 
-		led-red {
+		led_red: led-red {
 			label = "vim3:red";
 			gpios = <&gpio_expander 5 GPIO_ACTIVE_HIGH>;
 		};

Instead you should convert these to the new function/color attributes are described in:
Documentation/devicetree/bindings/leds/common.yaml

{
	function = LED_FUNCTION_STATUS;
	color = <LED_COLOR_ID_WHITE>;
}

Neil

#9 lore raw

PATCH 4/8 arm64: dts: meson: remove fixed memory size for Khadas VIM3/VIM3L meson-khadas-vim3

In reply to Artem Lapkin

no need force setup memory size! VIM3 boards have 2Gb and 4Gb variants memory size will be automatically defined

mainline uboot works properly in any case
but old vendor uboot works not properly for 4Gb variants

---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +5 -0
index 7e137399257..3111bf35c0f 100644
@@ -20,10 +20,15 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+/*      no need force setup memory size!
+        VIM3 boards have 2Gb and 4Gb variants
+        memory size will be automatically defined
+
 	memory@0 {
 		device_type = "memory";
 		reg = <0x0 0x0 0x0 0x80000000>;
 	};
+*/
 
 	adc-keys {
 		compatible = "adc-keys";
Signature · 1 line
2.25.1
#10 lore raw

Re: [PATCH 4/8] arm64: dts: meson: remove fixed memory size for Khadas VIM3/VIM3L meson-khadas-vim3

Hi Artem,

Quoted 7 lines · Artem Lapkin

no need force setup memory size! VIM3 boards have 2Gb and 4Gb variants memory size will be automatically defined

mainline uboot works properly in any case
but old vendor uboot works not properly for 4Gb variants

can you be more specific with what "does not work properly"? is Linux then only able to use 2GB or is there any other problem?

overall this sounds like a bug in the vendor u-boot to me
I don't see that we have any other Amlogic .dts which needs this hack, so I'd like to hear the feedback from the device-tree maintainers (for example Rob) as well

Best regards,
Martin

#11 lore raw

Re: [PATCH 4/8] arm64: dts: meson: remove fixed memory size for Khadas VIM3/VIM3L meson-khadas-vim3

Quoted 10 lines · Martin Blumenstingl

Hi Artem,

Quoted 7 lines · Artem Lapkin

no need force setup memory size! VIM3 boards have 2Gb and 4Gb variants memory size will be automatically defined

mainline uboot works properly in any case
but old vendor uboot works not properly for 4Gb variants

Quoted 7 lines

can you be more specific with what "does not work properly"? is Linux then only able to use 2GB or is there any other problem?

overall this sounds like a bug in the vendor u-boot to me
I don't see that we have any other Amlogic .dts which needs this hack, so I'd like to hear the feedback from the device-tree maintainers (for example Rob) as well

AFAIK the vendor u-boot updates the memory correctly, what it doesn't is adding the reserved memory zones.

Neil

Quoted 5 lines

Best regards,
Martin

#12 lore raw

PATCH 5/8 arm64: dts: meson: remove reset-gpios from ethernet node for VIM2 meson-gxm-khadas-vim2

In reply to Artem Lapkin

1) fix down/up ethernet interface - need remove reset-gpios for ethernet node

ifconfig eth0 down && ifconfig eth0 up # didnt works with reset-gpios

2) add max-speed 1Gbit

---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +1 -1
index a6baf865aa2..70343da2811 100644
@@ -195,7 +195,7 @@ external_phy: ethernet-phy@0 {
 
 		reset-assert-us = <10000>;
 		reset-deassert-us = <30000>;
-		reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
+		max-speed = <1000>;
 
 		interrupt-parent = <&gpio_intc>;
 		/* MAC_INTR on GPIOZ_15 */
Signature · 1 line
2.25.1
#13 lore raw

Re: [PATCH 5/8] arm64: dts: meson: remove reset-gpios from ethernet node for VIM2 meson-gxm-khadas-vim2

Hello Artem,

Quoted 4 lines · Artem Lapkin

1) fix down/up ethernet interface - need remove reset-gpios for ethernet node

ifconfig eth0 down && ifconfig eth0 up # didnt works with reset-gpios

what is the problem that you observe here?
did you investigate further why resetting the PHY changes this?

the problem I see with removing the reset-gpios is that we cannot fully reset the PHY into a defined state
some of the registers are kept with a soft-reset

Quoted 1 line

2) add max-speed 1Gbit

my understanding is that max-speed is needed when (in this case) the PHY advertises a higher speed than the hardware is actually capable of (for whatever reason)
what is the problem that you have seen when max-speed was not set?

Best regards,
Martin

A message that is not in the archive (sent off-list or not yet received): CAKaHn9+CWLJYN1Tt46VxBGNBEbVVJZWeL6ZJSf9w-5DmoxrvgQ@mail.gmail.com

#15 lore raw

Re: [PATCH 5/8] arm64: dts: meson: remove reset-gpios from ethernet node for VIM2 meson-gxm-khadas-vim2

Hello Artem,

(adding back the mailing-list recipients)

Quoted 9 lines · Art Nikpal

hello

Quoted 2 lines

what is the problem that you observe here?
did you investigate further why resetting the PHY changes this?

just try next commands
ifconfig eth0 down && ifconfig eth0 up
and ethernet never up again - need full reboot only

this means that "something" is either set up incorrectly in the Linux kernel or that u-boot does some magic (and the same magic is then missing in the Linux kernel)
I'll dig out my Khadas VIM2 to test this. what should I look out for (are there any error messages, dhcp not getting an IP address anymore, etc.)?

Quoted 3 lines

but if reset-gpios will be remove it works fine already - i have checked it many times

for example VIM3 same didnt use reset-gpios

that's interesting - I'm surprised to see this
I did a quick check and for 15 out of 18 .dts(i) files with RGMII phy-mode we use the reset-gpios:

$ grep -R 'phy-mode = "rgmii' arch/arm64/boot/dts/amlogic/ | wc -l
18
$ grep -R 'ethernet-phy@0' -A10 arch/arm64/boot/dts/amlogic/ | grep
reset-gpios | wc -l
15

so really I would like to add the reset-gpios to the VIM3 .dtsi as well once we figured out what's wrong on the VIM2

Best regards,
Martin

A message that is not in the archive (sent off-list or not yet received): CAKaHn9K6O8u6Br84S63V0PDFBhiRbMdd4-bvC5FxFe6izj_Dvg@mail.gmail.com

#17 lore raw

Re: [PATCH 5/8] arm64: dts: meson: remove reset-gpios from ethernet node for VIM2 meson-gxm-khadas-vim2

Hi Artem,

(adding back all Cc recipients - please use "reply all" so they don't get lost)

Quoted 11 lines · Art Nikpal

this means that "something" is either set up incorrectly in the Linux kernel or that u-boot does some magic (and the same magic is then missing in the Linux kernel)

maybe ;-)

Quoted 1 line

I'll dig out my Khadas VIM2 to test this. what should I look out for

(are there any error messages, dhcp not getting an IP address anymore, etc.)?

Quoted 6 lines

just start your VIM2 board with ethernet

1) check connection its must works fine for example try ping your default gw
2) do ifconfig eth0 down
3) do ifconfig eth0 up
4) check your connection again it will be broken and u cant restore it im sure ;-) only reboot

# ping -4 -c2 google.com && ifconfig eth0 down && ifconfig eth0 up &&
sleep 5s && ping -4 -c2 google.com
PING google.com (172.217.22.78) 56(84) bytes of data.
64 bytes from fra15s17-in-f14.1e100.net (172.217.22.78): icmp_seq=1
ttl=114 time=22.4 ms
64 bytes from fra15s17-in-f78.1e100.net (172.217.22.78): icmp_seq=2
ttl=114 time=22.5 ms

--- google.com ping statistics ---
2 [ 127.097495] meson8b-dwmac c9410000.ethernet eth0: Link is Down packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 22.375/22.415/22.455/0.040 ms

[  127.170167] meson8b-dwmac c9410000.ethernet eth0: PHY
[0.2009087f:00] driver [RTL8211F Gigabit Ethernet] (irq=38)
[  127.276459] meson8b-dwmac c9410000.ethernet eth0: No Safety
Features support found
[  127.278508] meson8b-dwmac c9410000.ethernet eth0: PTP not supported by HW
[  127.285230] meson8b-dwmac c9410000.ethernet eth0: configuring for
phy/rgmii link mode
[  130.425311] meson8b-dwmac c9410000.ethernet eth0: Link is Up -

1Gbps/Full - flow control rx/tx
PING google.com (172.217.22.78) 56(84) bytes of data.
64 bytes from fra15s17-in-f14.1e100.net (172.217.22.78): icmp_seq=1 ttl=114 time=22.4 ms
64 bytes from fra15s17-in-f78.1e100.net (172.217.22.78): icmp_seq=2 ttl=114 time=22.6 ms

--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 22.439/22.512/22.585/0.073 ms

note: the sleep 5s is needed to allow the link to come back up and to get an IP address via DHCP
also if the output is not easy to read in your email client then I have also uploaded it here: [0]

can you please show me the output of the debug logs in rtl8211f_config_init() from drivers/net/phy/realtek.c (for example by replacing dev_dbg with dev_err)?

Best regards,
Martin

[0] https://curlpaste.com/web/eaqun7

A message that is not in the archive (sent off-list or not yet received): CAKaHn9JxKBKW5AYvUNBAA+sNcHfNQNrx95NtLMnrfd0ypOaAoA@mail.gmail.com

#19 lore raw

Re: [PATCH 5/8] arm64: dts: meson: remove reset-gpios from ethernet node for VIM2 meson-gxm-khadas-vim2

Hi Artem,

Quoted 4 lines · Art Nikpal

OK today i can't reproduce it again on my new equipments ;-)

may be its some specific problem we can try forget about this

uh, this is weird
please let me know if you can reproduce it on your new hardware

thanks for the update :-)

Best regards,
Martin

#20 lore raw

PATCH 6/8 arm64: dts: meson: disable vrtc for VIM3L boards meson-khadas-vim3

In reply to Artem Lapkin

vrtc not used for meson-khadas-vim3

---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +4 -0
index 3111bf35c0f..81bb88a76d5 100644
@@ -284,6 +284,10 @@ &pwm_ef {
         pinctrl-names = "default";
 };
 
+&vrtc {
+	status = "disabled";
+};
+
 &saradc {
 	status = "okay";
 	vref-supply = <&vddao_1v8>;
Signature · 1 line
2.25.1
#21 lore raw

Re: [PATCH 6/8] arm64: dts: meson: disable vrtc for VIM3L boards meson-khadas-vim3

Hi,

Quoted 13 lines · Artem Lapkin

vrtc not used for meson-khadas-vim3

---
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +0 -0
index 3111bf35c0f..81bb88a76d5 100644

arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi &pwm_ef { · line 293

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +4 -0
@@ -284,6 +284,10 @@ &pwm_ef {
         pinctrl-names = "default";
 };
 
+&vrtc {
+	status = "disabled";
+};
+
 &saradc {
 	status = "okay";
 	vref-supply = <&vddao_1v8>;

The VRTC is one of the default suspend wake-up sources, so why would you disable it ?

If it collides with the real RTC, add aliases to move the vrtc in rtc1 and set the real RTC as rtc0.

 »       aliases·{
+»       »       rtc0·=·&rtc0;
+»       »       rtc1·=·&vrtc;
 »       };

Neil

#22 lore raw

PATCH 7/8 arm64: dts: meson: enable RTC for VIM1 meson-gxl-s905x-khadas-vim

In reply to Artem Lapkin

enable RTC for VIM1 meson-gxl-s905x-khadas-vim

---
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +1 -1
index 8bcdffdf55d..354f21d4171 100644
@@ -98,7 +98,7 @@ &i2c_B {
 
 	rtc: rtc@51 {
 		/* has to be enabled manually when a battery is connected: */
-		status = "disabled";
+		status = "okay";
 		compatible = "haoyu,hym8563";
 		reg = <0x51>;
 		#clock-cells = <0>;
Signature · 1 line
2.25.1
#23 lore raw

Re: [PATCH 7/8] arm64: dts: meson: enable RTC for VIM1 meson-gxl-s905x-khadas-vim

Hi Artem,

Quoted 2 lines · Artem Lapkin

enable RTC for VIM1 meson-gxl-s905x-khadas-vim

I think the commit message should always explain *why* the change is necessary (what problem does it solve?)
for trivial changes the diff itself explains "what" is being changed

[...]

arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts &i2c_B { · line 100

Quoted 8 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +0 -0
index 8bcdffdf55d..354f21d4171 100644
@@ -98,7 +98,7 @@ &i2c_B {
 
        rtc: rtc@51 {
                /* has to be enabled manually when a battery is connected: */

why do we need to keep this comment?

same feedback applies to patch 8

Best regards,
Martin

#24 lore raw

PATCH 8/8 arm64: dts: meson: enable RTC for VIM2 meson-gxm-khadas-vim2

In reply to Artem Lapkin

enable RTC for VIM2 meson-gxm-khadas-vim2

---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +1 -1
index 70343da2811..76b7e34a9a3 100644
@@ -229,7 +229,7 @@ &i2c_B {
 
 	rtc: rtc@51 {
 		/* has to be enabled manually when a battery is connected: */
-		status = "disabled";
+		status = "okay";
 		compatible = "haoyu,hym8563";
 		reg = <0x51>;
 		#clock-cells = <0>;
Signature · 1 line
2.25.1
reviewer
#25 lore raw

Re: [PATCH 8/8] arm64: dts: meson: enable RTC for VIM2 meson-gxm-khadas-vim2

Quoted 12 lines · Artem Lapkin

enable RTC for VIM2 meson-gxm-khadas-vim2

---
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +0 -0
index 70343da2811..76b7e34a9a3 100644

arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts &i2c_B { · line 231

Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +0 -0
@@ -229,7 +229,7 @@ &i2c_B {
 
 	rtc: rtc@51 {
 		/* has to be enabled manually when a battery is connected: */

If going for this change, this comment should have been removed

arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts &i2c_B { · line 232

Quoted 2 lines
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +1 -1
-		status = "disabled";
+		status = "okay";

Unless the VIMs are provided with a battery by default, I believe this should be kept disabled and only enabled by the bootloader if necessary.

If you think differently, feel free to resubmit with a complete commit description and some details as to how this would be an improvement.

Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +0 -0
 		compatible = "haoyu,hym8563";
 		reg = <0x51>;
 		#clock-cells = <0>;