forked from armbian/build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd2011f
commit 2735182
Showing
2 changed files
with
67 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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; | ||
+ }; | ||
|
@@ -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>, | ||
|
@@ -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; | ||
+ }; | ||
+ | ||
|
@@ -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 { | ||
|
@@ -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; | ||
+ }; | ||
+ | ||
|
@@ -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"; | ||
|
@@ -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 */ | ||
|
@@ -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"; | ||
+ | ||
|
@@ -517,7 +514,6 @@ index 000000000000..fcffbd0e24cc | |
+ spi-max-frequency = <104000000>; | ||
+ }; | ||
+}; | ||
+*/ | ||
+ | ||
+&tdmif_b { | ||
+ status = "okay"; | ||
|
@@ -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>; | ||
+}; | ||
|
@@ -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", | ||
|
@@ -597,9 +584,9 @@ index 000000000000..fcffbd0e24cc | |
+ | ||
+ /* 1-wire */ | ||
+ w1: onewire@18 { | ||
+ compatible = "maxim,ds2482"; | ||
+ reg = <0x18>; | ||
+ }; | ||
+ compatible = "maxim,ds2482"; | ||
+ reg = <0x18>; | ||
+ }; | ||
+ | ||
+}; | ||
+ | ||
|
33 changes: 33 additions & 0 deletions
33
patch/kernel/archive/meson64-6.9/jethome-0005-jethub-j200-add-meson64-reset-driver.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|