Skip to content

Commit 43a786c

Browse files
committed
JetHub: Update JetHub D2 uboot to 2025.04
Signed-off-by: Viacheslav Bocharov <adeep@lexina.in>
1 parent b24a33b commit 43a786c

8 files changed

+525
-140
lines changed

config/sources/families/jethub.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ elif [[ "$BOARD" == "jethubj200" ]]; then
3131
ASOUND_STATE="${ASOUND_STATE:-"asound.state.meson64"}"
3232
CPUMIN=667000
3333
CPUMAX=2100000
34-
BOOTBRANCH="tag:v2024.07"
35-
BOOTPATCHDIR="v2024.07"
34+
BOOTBRANCH="tag:v2025.04"
35+
BOOTPATCHDIR="v2025.04"
3636
fi
3737

3838
# JetHub builds userspace tooling with c++ (gpp) toolchain in buildjethomecmds() below.

patch/u-boot/v2024.07/board_jethubj200/0001-Add-JetHub-D2.patch renamed to patch/u-boot/v2025.04/board_jethubj200/0001-Add-JetHub-D2.patch

Lines changed: 69 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@ Subject: Add JetHub D2
66
---
77
arch/arm/dts/Makefile | 3 +-
88
arch/arm/dts/meson-sm1-jethome-jethub-j200-u-boot.dtsi | 13 +
9-
arch/arm/dts/meson-sm1-jethome-jethub-j200.dts | 654 ++++++++++
9+
arch/arm/dts/meson-sm1-jethome-jethub-j200.dts | 711 ++++++++++
1010
board/amlogic/jethub-j200/MAINTAINERS | 8 +
1111
board/amlogic/jethub-j200/Makefile | 6 +
1212
board/amlogic/jethub-j200/jethub-j200.c | 89 ++
13-
configs/jethub_j200_defconfig | 119 ++
13+
configs/jethub_j200_defconfig | 120 ++
1414
doc/board/amlogic/index.rst | 1 +
1515
doc/board/amlogic/jethub-j200.rst | 50 +
1616
drivers/power/regulator/regulator-uclass.c | 2 +-
1717
include/configs/jethub.h | 9 +
18-
11 files changed, 952 insertions(+), 2 deletions(-)
18+
11 files changed, 1010 insertions(+), 2 deletions(-)
1919

2020
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
2121
index 111111111111..222222222222 100644
2222
--- a/arch/arm/dts/Makefile
2323
+++ b/arch/arm/dts/Makefile
24-
@@ -100,7 +100,8 @@ dtb-$(CONFIG_ARCH_S5P4418) += \
24+
@@ -78,7 +78,8 @@ dtb-$(CONFIG_ARCH_S5P4418) += \
2525
s5p4418-nanopi2.dtb
2626

2727
dtb-$(CONFIG_ARCH_MESON) += \
2828
- meson-a1-ad401.dtb
2929
+ meson-a1-ad401.dtb \
3030
+ meson-sm1-jethome-jethub-j200.dtb
3131

32-
dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
33-
tegra20-medcom-wide.dtb \
32+
dtb-$(CONFIG_ARCH_TEGRA) += \
33+
tegra20-acer-a500-picasso.dtb \
3434
diff --git a/arch/arm/dts/meson-sm1-jethome-jethub-j200-u-boot.dtsi b/arch/arm/dts/meson-sm1-jethome-jethub-j200-u-boot.dtsi
3535
new file mode 100644
3636
index 000000000000..111111111111
@@ -55,7 +55,7 @@ new file mode 100644
5555
index 000000000000..111111111111
5656
--- /dev/null
5757
+++ b/arch/arm/dts/meson-sm1-jethome-jethub-j200.dts
58-
@@ -0,0 +1,654 @@
58+
@@ -0,0 +1,711 @@
5959
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
6060
+/*
6161
+ * Copyright (c) 2024 JetHome
@@ -710,6 +710,63 @@ index 000000000000..111111111111
710710
+ reg = <0x32 0x20>;
711711
+ };
712712
+};
713+
+
714+
+&cpu_thermal {
715+
+ trips {
716+
+ cpu_passive: cpu-passive {
717+
+ temperature = <70000>; /* millicelsius */
718+
+ hysteresis = <2000>; /* millicelsius */
719+
+ type = "passive"; /* */
720+
+ };
721+
+
722+
+ cpu_hot: cpu-hot {
723+
+ temperature = <85000>; /* millicelsius */
724+
+ hysteresis = <2000>; /* millicelsius */
725+
+ type = "hot";
726+
+ };
727+
+
728+
+ cpu_critical: cpu-critical {
729+
+ temperature = <90000>; /* millicelsius */
730+
+ hysteresis = <2000>; /* millicelsius */
731+
+ type = "critical";
732+
+ };
733+
+ };
734+
+
735+
+ cooling-maps {
736+
+ map0 {
737+
+ trip = <&cpu_passive>;
738+
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
739+
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
740+
+ <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
741+
+ <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
742+
+ };
743+
+
744+
+ map1 {
745+
+ trip = <&cpu_hot>;
746+
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
747+
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
748+
+ <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
749+
+ <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
750+
+ };
751+
+ };
752+
+};
753+
+
754+
+&ddr_thermal {
755+
+ trips {
756+
+ ddr_passive: ddr-passive {
757+
+ temperature = <70000>; /* millicelsius */
758+
+ hysteresis = <2000>; /* millicelsius */
759+
+ type = "passive";
760+
+ };
761+
+
762+
+ ddr_critical: ddr-critical {
763+
+ temperature = <85000>; /* millicelsius */
764+
+ hysteresis = <2000>; /* millicelsius */
765+
+ type = "critical";
766+
+ };
767+
+ };
768+
+
769+
+};
713770
diff --git a/board/amlogic/jethub-j200/MAINTAINERS b/board/amlogic/jethub-j200/MAINTAINERS
714771
new file mode 100644
715772
index 000000000000..111111111111
@@ -749,7 +806,7 @@ index 000000000000..111111111111
749806
+ *
750807
+ */
751808
+
752-
+#include <common.h>
809+
+//#include <common.h>
753810
+#include <dm.h>
754811
+#include <adc.h>
755812
+#include <env.h>
@@ -836,7 +893,7 @@ new file mode 100644
836893
index 000000000000..111111111111
837894
--- /dev/null
838895
+++ b/configs/jethub_j200_defconfig
839-
@@ -0,0 +1,119 @@
896+
@@ -0,0 +1,120 @@
840897
+CONFIG_OF_UPSTREAM=n
841898
+CONFIG_ARM=y
842899
+CONFIG_SYS_BOARD="jethub-j200"
@@ -893,6 +950,7 @@ index 000000000000..111111111111
893950
+CONFIG_DM_SPI_FLASH=y
894951
+CONFIG_SPI_FLASH_WINBOND=y
895952
+CONFIG_SPI_FLASH_XTX=y
953+
+CONFIG_SPI_LOAD=y
896954
+CONFIG_PHY_REALTEK=y
897955
+CONFIG_DM_MDIO=y
898956
+CONFIG_DM_MDIO_MUX=y
@@ -960,7 +1018,7 @@ diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst
9601018
index 111111111111..222222222222 100644
9611019
--- a/doc/board/amlogic/index.rst
9621020
+++ b/doc/board/amlogic/index.rst
963-
@@ -95,6 +95,7 @@ Board Documentation
1021+
@@ -97,6 +97,7 @@ Board Documentation
9641022
beelink-gtkingpro
9651023
jethub-j80
9661024
jethub-j100
@@ -1028,7 +1086,7 @@ diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulato
10281086
index 111111111111..222222222222 100644
10291087
--- a/drivers/power/regulator/regulator-uclass.c
10301088
+++ b/drivers/power/regulator/regulator-uclass.c
1031-
@@ -186,7 +186,7 @@ int regulator_set_enable(struct udevice *dev, bool enable)
1089+
@@ -191,7 +191,7 @@ int regulator_set_enable(struct udevice *dev, bool enable)
10321090
}
10331091
}
10341092
}

patch/u-boot/v2024.07/board_jethubj200/0003-add-ssd1306-joystick-and-gpio-expander-support.patch renamed to patch/u-boot/v2025.04/board_jethubj200/0002-add-ssd1306-joystick-and-gpio-expander-support.patch

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,27 @@ Date: Thu, 27 Nov 2025 17:30:11 +0300
44
Subject: add ssd1306, joystick and gpio expander support
55

66
---
7-
arch/arm/dts/meson-sm1-jethome-jethub-j200.dts | 78 ++++++++++++++++++-
7+
arch/arm/dts/meson-sm1-jethome-jethub-j200.dts | 78 +++++++++-
88
1 file changed, 77 insertions(+), 1 deletion(-)
99

1010
diff --git a/arch/arm/dts/meson-sm1-jethome-jethub-j200.dts b/arch/arm/dts/meson-sm1-jethome-jethub-j200.dts
11-
index 3151a99974c..8acc3785ba3 100644
11+
index 111111111111..222222222222 100644
1212
--- a/arch/arm/dts/meson-sm1-jethome-jethub-j200.dts
1313
+++ b/arch/arm/dts/meson-sm1-jethome-jethub-j200.dts
14-
@@ -9,11 +9,12 @@
15-
#include "meson-sm1.dtsi"
16-
14+
@@ -11,7 +11,8 @@
1715
#include <dt-bindings/gpio/meson-g12a-gpio.h>
1816
#include <dt-bindings/leds/common.h>
1917
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
2018
-
2119
+#include <dt-bindings/input/input.h>
2220
+#include <dt-bindings/gpio/gpio.h>
23-
21+
2422
/ {
25-
26-
compatible = "jethome,jethub-j200", "amlogic,sm1";
27-
model = "JetHome JetHub D2";
28-
@@ -245,10 +246,63 @@
29-
30-
sound {
31-
model = "JETHUB-D2";
32-
};
33-
23+
24+
@@ -247,6 +248,59 @@
25+
model = "JETHUB-D2";
26+
};
27+
3428
+ gpio-keys {
3529
+ compatible = "gpio-keys-polled";
3630
+ poll-interval = <100>;
@@ -85,16 +79,12 @@ index 3151a99974c..8acc3785ba3 100644
8579
+ };
8680
+ };
8781
};
88-
82+
8983
&arb {
90-
status = "okay";
91-
};
92-
@@ -627,10 +681,32 @@
93-
temp2: tmp102@49 {
94-
compatible = "ti,tmp102";
95-
reg = <0x49>;
96-
};
97-
84+
@@ -629,6 +683,28 @@
85+
reg = <0x49>;
86+
};
87+
9888
+ ssd1306: oled@3c {
9989
+ compatible = "solomon,ssd1306";
10090
+ reg = <0x3c>;
@@ -118,9 +108,8 @@ index 3151a99974c..8acc3785ba3 100644
118108
+ "JOY_CENTER", "JOY_HOME", "JOY_BACK", "";
119109
+ };
120110
};
121-
111+
122112
&efuse {
123-
eth_mac: eth-mac@0 {
124-
reg = <0x0 0x6>;
125-
--
113+
--
126114
Armbian
115+
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Evgeny Bachinin <EABachinin@salutedevices.com>
3+
Date: Mon, 10 Feb 2025 20:50:14 +0300
4+
Subject: arm: meson: unify type being used for socinfo
5+
6+
socinfo_ API uses u32 type, hence let's use it everywhere
7+
for consistency.
8+
9+
Signed-off-by: Evgeny Bachinin <EABachinin@salutedevices.com>
10+
Link: https://lore.kernel.org/r/20250210-meson_chip_id_all_vers-v1-1-b98f8b6880b8@salutedevices.com
11+
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
12+
---
13+
arch/arm/mach-meson/board-info.c | 9 +++++----
14+
1 file changed, 5 insertions(+), 4 deletions(-)
15+
16+
diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c
17+
index 111111111111..222222222222 100644
18+
--- a/arch/arm/mach-meson/board-info.c
19+
+++ b/arch/arm/mach-meson/board-info.c
20+
@@ -7,6 +7,7 @@
21+
#include <init.h>
22+
#include <asm/global_data.h>
23+
#include <asm/io.h>
24+
+#include <asm/types.h>
25+
#include <dm.h>
26+
#include <linux/bitfield.h>
27+
#include <regmap.h>
28+
@@ -125,12 +126,12 @@ static const char *socinfo_to_soc_id(u32 socinfo)
29+
return "Unknown";
30+
}
31+
32+
-static unsigned int get_socinfo(void)
33+
+static u32 get_socinfo(void)
34+
{
35+
struct regmap *regmap;
36+
int nodeoffset, ret;
37+
ofnode node;
38+
- unsigned int socinfo;
39+
+ u32 socinfo;
40+
41+
/* find the offset of compatible node */
42+
nodeoffset = fdt_node_offset_by_compatible(gd->fdt_blob, -1,
43+
@@ -162,7 +163,7 @@ static unsigned int get_socinfo(void)
44+
45+
int checkboard(void)
46+
{
47+
- unsigned int socinfo;
48+
+ u32 socinfo;
49+
50+
socinfo = get_socinfo();
51+
if (!socinfo)
52+
@@ -181,7 +182,7 @@ int checkboard(void)
53+
54+
int meson_get_soc_rev(char *buff, size_t buff_len)
55+
{
56+
- unsigned int socinfo;
57+
+ u32 socinfo;
58+
59+
socinfo = get_socinfo();
60+
if (!socinfo)
61+
--
62+
Armbian
63+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Evgeny Bachinin <EABachinin@salutedevices.com>
3+
Date: Mon, 10 Feb 2025 20:50:15 +0300
4+
Subject: arm: meson: sm: get rid of SM_CHIP_ID_SIZE
5+
6+
SM_CHIP_ID_SIZE is used nowhere. Moreover, it specifies wrong
7+
chip_id size: Amlogic chip_id v1 and v2 is always 16 bytes long.
8+
9+
Signed-off-by: Evgeny Bachinin <EABachinin@salutedevices.com>
10+
Link: https://lore.kernel.org/r/20250210-meson_chip_id_all_vers-v1-2-b98f8b6880b8@salutedevices.com
11+
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
12+
---
13+
arch/arm/mach-meson/sm.c | 1 -
14+
1 file changed, 1 deletion(-)
15+
16+
diff --git a/arch/arm/mach-meson/sm.c b/arch/arm/mach-meson/sm.c
17+
index 111111111111..222222222222 100644
18+
--- a/arch/arm/mach-meson/sm.c
19+
+++ b/arch/arm/mach-meson/sm.c
20+
@@ -78,7 +78,6 @@ ssize_t meson_sm_write_efuse(uintptr_t offset, void *buffer, size_t size)
21+
22+
#define SM_CHIP_ID_LENGTH 119
23+
#define SM_CHIP_ID_OFFSET 4
24+
-#define SM_CHIP_ID_SIZE 12
25+
26+
int meson_sm_get_serial(void *buffer, size_t size)
27+
{
28+
--
29+
Armbian
30+

0 commit comments

Comments
 (0)