Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update JetHome JetHub D2 support #6736

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
From 7ad1d0a9aa045348451287ab7538201233c64a5b Mon Sep 17 00:00:00 2001
From 44819c568dc6156d8a15b48af4dec3f20d484408 Mon Sep 17 00:00:00 2001
From: Viacheslav Bocharov <[email protected]>
Date: Thu, 16 May 2024 15:14:08 +0300
Subject: [PATCH 2/2] arm64: dts: meson-axg: add support for JetHome JetHub D2
(j200)

JetHome Jethub D2 is a home automation controller with the following features:
JetHome Jethub D2 is a home automation controller with the following
features:
- DIN Rail Mounting
- Amlogic S905X3 (ARM Cortex-A55) quad-core
- micro-HDMI video out
Expand All @@ -23,8 +24,8 @@ JetHome Jethub D2 is a home automation controller with the following features:
Signed-off-by: Viacheslav Bocharov <[email protected]>
---
arch/arm64/boot/dts/amlogic/Makefile | 1 +
.../amlogic/meson-sm1-jethome-jethub-j200.dts | 632 ++++++++++++++++++
2 files changed, 633 insertions(+)
.../amlogic/meson-sm1-jethome-jethub-j200.dts | 618 ++++++++++++++++++
2 files changed, 619 insertions(+)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-jethome-jethub-j200.dts

diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
Expand All @@ -41,10 +42,10 @@ index 0f29517da5ec..d007b59497d4 100644
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-s905d3-libretech-cc.dtb
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-jethome-jethub-j200.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-jethome-jethub-j200.dts
new file mode 100644
index 000000000000..fcffbd0e24cc
index 000000000000..c309f25374b3
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-jethome-jethub-j200.dts
@@ -0,0 +1,632 @@
@@ -0,0 +1,618 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2024 JetHome
Expand Down Expand Up @@ -92,7 +93,7 @@ index 000000000000..fcffbd0e24cc
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>; // #TODO: check
+ gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>;
+ enable-active-high;
+ regulator-always-on;
+ };
Expand All @@ -109,7 +110,7 @@ index 000000000000..fcffbd0e24cc
+ enable-active-high;
+ regulator-always-on;
+
+ gpios = <&gpio_ao GPIOAO_6 GPIO_OPEN_SOURCE>; // #TODO: check
+ gpios = <&gpio_ao GPIOAO_6 GPIO_OPEN_SOURCE>;
+ gpios-states = <0>;
+
+ states = <3300000 0>,
Expand Down Expand Up @@ -140,7 +141,7 @@ index 000000000000..fcffbd0e24cc
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ vin-supply = <&main_12v>;
+ gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; // #TODO: check
+ gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
+ enable-active-high;
+ };
+
Expand All @@ -160,7 +161,6 @@ index 000000000000..fcffbd0e24cc
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vddao_3v3>;
+ regulator-always-on;
+ /* FIXME: actually controlled by VDDCPU_B_EN */
+ };
+
+ vddcpu: regulator-vddcpu {
Expand Down Expand Up @@ -261,24 +261,14 @@ index 000000000000..fcffbd0e24cc
+ };
+ };
+
+ meson64-reboot {
+ compatible = "meson64,reboot";
+ sys_reset = <0x84000009>;
+ sys_poweroff = <0x84000008>;
+
+ sd-vqen = <&gpio GPIOE_2 GPIO_ACTIVE_HIGH>;
+ sd-vqsw = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;
+ sd-vmmc = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-green {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
+ gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "activity";
+ linux,default-trigger = "heartbeat";
+ panic-indicator;
+ };
+
Expand All @@ -295,8 +285,21 @@ index 000000000000..fcffbd0e24cc
+ model = "JETHUB-D2";
+ };
+
+};
+ usb-hub {
+ dr_mode = "host";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* USB 2.0 hub with reset gpio */
+ hub_2_0: hub@1 {
+ compatible = "usb5e3,610";
+ reg = <1>;
+ reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&vcc_5v>;
+ };
+ };
+
+};
+
+&arb {
+ status = "okay";
Expand Down Expand Up @@ -424,7 +427,7 @@ index 000000000000..fcffbd0e24cc
+ "MCU_RESET", /* GPIOAO_4 */
+ "POWER_GOOD", /* GPIOAO_5 */
+ "",
+ "MCU_BOOT", /* GPIOAO_7 */
+ "GPIO_EXPANDER", /* GPIOAO_7 */
+ "MCU_UART_TX", /* GPIOAO_8 */
+ "MCU_UART_RX", /* GPIOAO_9 */
+ "BUTTON_USR", /* GPIOAO_10 */
Expand Down Expand Up @@ -498,14 +501,8 @@ index 000000000000..fcffbd0e24cc
+ vqmmc-supply = <&flash_1v8>;
+};
+
+/*
+&sd_emmc_c {
+ pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_4b_pins>, <&emmc_ds_pins>;
+ bus-width = <4>;
+};
+
+&spifc {
+ status = "okay";
+ status = "disabled";
+ pinctrl-0 = <&nor_pins>;
+ pinctrl-names = "default";
+
Expand All @@ -517,7 +514,6 @@ index 000000000000..fcffbd0e24cc
+ spi-max-frequency = <104000000>;
+ };
+};
+*/
+
+&tdmif_b {
+ status = "okay";
Expand Down Expand Up @@ -555,19 +551,6 @@ index 000000000000..fcffbd0e24cc
+ vbus-supply = <&usb_pwr_en>;
+};
+
+&dwc2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* USB 2.0 hub on otg port */
+ hub_2_0: hub@1 {
+ compatible = "usb4b4,6504"; /* use 10000us timeout for reset */
+ reg = <1>;
+ reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
+ vdd-supply = <&vcc_5v>;
+ };
+};
+
+&usb2_phy0 {
+ phy-supply = <&vcc_5v>;
+};
Expand All @@ -585,6 +568,10 @@ index 000000000000..fcffbd0e24cc
+ reg = <0x22>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupt-parent = <&gpio_intc>;
+ interrupts = <IRQID_GPIOAO_7 IRQ_TYPE_LEVEL_LOW>;
+
+ gpio-line-names =
+ "RELAY_1", "RELAY_2",
Expand All @@ -597,9 +584,9 @@ index 000000000000..fcffbd0e24cc
+
+ /* 1-wire */
+ w1: onewire@18 {
+ compatible = "maxim,ds2482";
+ reg = <0x18>;
+ };
+ compatible = "maxim,ds2482";
+ reg = <0x18>;
+ };
+
+};
+
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From d2a9ccf69cfc856f873372784a46b5088dd2aada Mon Sep 17 00:00:00 2001
From: Viacheslav Bocharov <[email protected]>
Date: Thu, 13 Jun 2024 10:17:07 +0300
Subject: [PATCH 3/3] add meson64-reset driver

---
.../boot/dts/amlogic/meson-sm1-jethome-jethub-j200.dts | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-jethome-jethub-j200.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-jethome-jethub-j200.dts
index c309f25374b3..4c84ed0db1cc 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-jethome-jethub-j200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-jethome-jethub-j200.dts
@@ -213,6 +213,16 @@ codec {
};
};

+ meson64-reboot {
+ compatible = "meson64,reboot";
+ sys_reset = <0x84000009>;
+ sys_poweroff = <0x84000008>;
+
+ sd-vqen = <&gpio GPIOE_2 GPIO_ACTIVE_HIGH>;
+ sd-vqsw = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;
+ sd-vmmc = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
+ };
+
leds {
compatible = "gpio-leds";

--
2.45.2

Loading
Loading