Skip to contentSkip to conversation

arm64: dts: amlogic: meson-s4: enable RTC and IR for Khadas VIM1S

PATCH Applied Nick Xie 2 participants 8 messages Mar 27 – Mar 30

Subsystems (2)
lore
Share & tools
lore

Nick Xie

author
#0 lore raw

cover arm64: dts: amlogic: meson-s4: enable RTC and IR for Khadas VIM1S

This series adds support for the Real Time Clock (RTC) on the Amlogic Meson S4 (S905Y4) SoC and enables the hardware RTC and IR receiver on the Khadas VIM1S board.

- Patch 1 adds the internal Virtual RTC (VRTC) controller node to the Meson S4 SoC dtsi.
- Patch 2 enables the I2C-attached Haoyu Micro HYM8563 RTC on the Khadas VIM1S board. It also sets up aliases to ensure the hardware RTC is prioritized as rtc0 over the VRTC.
- Patch 3 configures the default keymap to "rc-khadas" to support the official Khadas IR remote control.

Nick Xie (3):
arm64: dts: amlogic: meson-s4: add VRTC node
arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable HYM8563 RTC
arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: use rc-khadas
keymap

 .../dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts | 16 ++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-s4.dtsi        |  5 +++++
 2 files changed, 21 insertions(+)
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 1/3 arm64: dts: amlogic: meson-s4: add VRTC node

Add the Virtual RTC (VRTC) controller node to the Meson S4 SoC dtsi.

---
 arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/amlogic/meson-s4.dtsi +5 -0
index 936a5c1353d15..2a6fbd5308362 100644
@@ -59,6 +59,11 @@ psci {
 		method = "smc";
 	};
 
+	vrtc: rtc@fe010288 {
+		compatible = "amlogic,meson-vrtc";
+		reg = <0x0 0xfe010288 0x0 0x4>;
+	};
+
 	xtal: xtal-clk {
 		compatible = "fixed-clock";
 		clock-frequency = <24000000>;
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH v1 1/3] arm64: dts: amlogic: meson-s4: add VRTC node

Quoted 13 lines · Nick Xie

Add the Virtual RTC (VRTC) controller node to the Meson S4 SoC dtsi.

---
  arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 5 +++++
  1 file changed, 5 insertions(+)
arch/arm64/boot/dts/amlogic/meson-s4.dtsi +0 -0
index 936a5c1353d15..2a6fbd5308362 100644
@@ -59,6 +59,11 @@ psci {
  		method = "smc";

arch/arm64/boot/dts/amlogic/meson-s4.dtsi psci { · line 69

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-s4.dtsi +5 -0
  	};
 
+	vrtc: rtc@fe010288 {
+		compatible = "amlogic,meson-vrtc";
+		reg = <0x0 0xfe010288 0x0 0x4>;
+	};
+
  	xtal: xtal-clk {
  		compatible = "fixed-clock";
  		clock-frequency = <24000000>;

Thanks,
Neil

author
#3 lore raw

PATCH 2/3 arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable HYM8563 RTC

In reply to Nick Xie

The Khadas VIM1S board has an on-board Haoyu Micro HYM8563 Real Time Clock (RTC) connected to the I2C1 bus.

Enable the I2C1 controller and add the RTC child node to support hardware clock persistence.

---
 .../dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts  | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts +15 -0
index 792ab45c4c944..7314e0ab81da3 100644
@@ -20,6 +20,8 @@ aliases {
 		mmc0 = &emmc; /* eMMC */
 		mmc1 = &sd; /* SD card */
 		mmc2 = &sdio; /* SDIO */
+		rtc0 = &rtc;
+		rtc1 = &vrtc;
 		serial0 = &uart_b;
 	};
 
@@ -223,6 +225,19 @@ &ethmac {
 	phy-mode = "rmii";
 };
 
+&i2c1 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins2>;
+	clock-frequency = <100000>;
+
+	rtc: rtc@51 {
+		compatible = "haoyu,hym8563";
+		reg = <0x51>;
+		#clock-cells = <0>;
+	};
+};
+
 &ir {
 	status = "okay";
 	pinctrl-0 = <&remote_pins>;
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 2/3
#4 lore raw

Re: [PATCH v1 2/3] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable HYM8563 RTC

Quoted 34 lines · Nick Xie

The Khadas VIM1S board has an on-board Haoyu Micro HYM8563 Real Time Clock (RTC) connected to the I2C1 bus.

Enable the I2C1 controller and add the RTC child node to support hardware clock persistence.

---
  .../dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts  | 15 +++++++++++++++
  1 file changed, 15 insertions(+)
arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts +8 -0
index 792ab45c4c944..7314e0ab81da3 100644
@@ -20,6 +20,8 @@ aliases {
  		mmc0 = &emmc; /* eMMC */
  		mmc1 = &sd; /* SD card */
  		mmc2 = &sdio; /* SDIO */
+		rtc0 = &rtc;
+		rtc1 = &vrtc;
  		serial0 = &uart_b;
  	};
 
@@ -223,6 +225,19 @@ &ethmac {
  	phy-mode = "rmii";
  };
 
+&i2c1 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins2>;
+	clock-frequency = <100000>;
+

arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts &ethmac { · line 243

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts +7 -0
+	rtc: rtc@51 {
+		compatible = "haoyu,hym8563";
+		reg = <0x51>;
+		#clock-cells = <0>;
+	};
+};
+
  &ir {
  	status = "okay";
  	pinctrl-0 = <&remote_pins>;

Thanks,
Neil

author
#5 lore raw

PATCH 3/3 arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: use rc-khadas keymap

In reply to Nick Xie

The Khadas VIM1S board has an onboard IR receiver. Configure the default keymap to "rc-khadas" to support the official Khadas IR remote control.

---
 arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts +1 -0
index 7314e0ab81da3..99d5df71b9cd4 100644
@@ -242,6 +242,7 @@ &ir {
 	status = "okay";
 	pinctrl-0 = <&remote_pins>;
 	pinctrl-names = "default";
+	linux,rc-map-name = "rc-khadas";
 };
 
 &pwm_ef {
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 3/3
#6 lore raw

Re: [PATCH v1 3/3] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: use rc-khadas keymap

Quoted 14 lines · Nick Xie

The Khadas VIM1S board has an onboard IR receiver. Configure the default keymap to "rc-khadas" to support the official Khadas IR remote control.

---
  arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts | 1 +
  1 file changed, 1 insertion(+)
arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts +0 -0
index 7314e0ab81da3..99d5df71b9cd4 100644

arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts &ir { · line 248

Quoted 7 lines
arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts +1 -0
@@ -242,6 +242,7 @@ &ir {
  	status = "okay";
  	pinctrl-0 = <&remote_pins>;
  	pinctrl-names = "default";
+	linux,rc-map-name = "rc-khadas";
  };
 
  &pwm_ef {

Thanks,
Neil

maintainer Applied
#7 lore raw
In reply to Nick Xie

Hi,

Quoted 12 lines · Nick Xie

This series adds support for the Real Time Clock (RTC) on the Amlogic Meson S4 (S905Y4) SoC and enables the hardware RTC and IR receiver on the Khadas VIM1S board.

- Patch 1 adds the internal Virtual RTC (VRTC) controller node to the Meson S4 SoC dtsi.
- Patch 2 enables the I2C-attached Haoyu Micro HYM8563 RTC on the Khadas VIM1S board. It also sets up aliases to ensure the hardware RTC is prioritized as rtc0 over the VRTC.
- Patch 3 configures the default keymap to "rc-khadas" to support the official Khadas IR remote control.

Quoted 1 line

[...]

Thanks, Applied to https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git (v7.1/arm64-dt)

[1/3] arm64: dts: amlogic: meson-s4: add VRTC node

      https://git.kernel.org/amlogic/c/af0f8f769f89715692ba7abc4716ecb7aa9af028
[2/3] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable HYM8563 RTC
      https://git.kernel.org/amlogic/c/3da3598f65d00f72a17a16c171ba52897d8e96a6
[3/3] arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: use rc-khadas keymap
      https://git.kernel.org/amlogic/c/c15edbda012eff7cca4c6c6bfedc04bde5e8adf6

These changes has been applied on the intermediate git tree [1].

The v7.1/arm64-dt branch will then be sent via a formal Pull Request to the Linux SoC maintainers for inclusion in their intermediate git branches in order to be sent to Linus during the next merge window, or sooner if it's a set of fixes.

In the cases of fixes, those will be merged in the current release candidate kernel and as soon they appear on the Linux master branch they will be backported to the previous Stable and Long-Stable kernels [2].

The intermediate git branches are merged daily in the linux-next tree [3], people are encouraged testing these pre-release kernels and report issues on the relevant mailing-lists.

If problems are discovered on those changes, please submit a signed-off-by revert patch followed by a corrective changeset.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[3] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

Signature · 1 line
Neil