* [PATCH v3 0/3] arm64: dts: meson-s4: add support for Khadas VIM1S
@ 2026-01-15 3:00 Nick Xie
2026-01-15 3:00 ` [PATCH v3 1/3] dt-bindings: arm: amlogic: introduce specific compatibles for S4 family Nick Xie
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Nick Xie @ 2026-01-15 3:00 UTC (permalink / raw)
To: neil.armstrong, khilman, jbrunet, martin.blumenstingl, devicetree,
linux-kernel, linux-arm-kernel, linux-amlogic
Cc: xianwei.zhao, christianshewitt, krzk+dt, robh, conor+dt, nick,
Nick Xie
This series adds initial support for the Khadas VIM1S single board computer.
The Khadas VIM1S is based on the Amlogic S905Y4 (S4 family) SoC.
It features:
- 2GB LPDDR4 RAM
- 16GB eMMC 5.1 storage
- 32MB SPI flash
- 100M Ethernet
- AP6256 Wireless (802.11 a/b/g/n/ac, BT5.0)
- HDMI 2.1 video
- 2x USB 2.0 ports
- 1x USB-C (power) with USB 2.0 OTG
- 2x LED's (1x red, 1x white)
- 3x buttons (power, function, reset)
- IR receiver
- 40pin GPIO Header
- 1x micro SD card slot
Changes in v3:
- Split the patch series to properly distinguish between S805X2 and
S905Y4 SoCs in dt-bindings and compatible strings.
- Patch 1: Updated bindings to use specific compatibles (s805x2/s905y4)
instead of just generic s4.
- Patch 2: (New) Updated existing AQ222 dts to use the new s805x2 compatible.
- Patch 3: Updated compatible string to use s905y4.
- Fixed Author/SoB mismatch in all patches.
- Link to v2: https://lore.kernel.org/linux-amlogic/20260114062549.68954-1-nick@khadas.com/
Changes in v2:
- dts: fixed dtbs_check warning: removed unsupported 'enable-active-low' property
from regulator-sd-3v3 node
- Link to v1: https://lore.kernel.org/linux-amlogic/20260113090951.35928-1-nick@khadas.com/
Nick Xie (3):
dt-bindings: arm: amlogic: introduce specific compatibles for S4
family
arm64: dts: meson-s4-aq222: update compatible string with s805x2
arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree
.../devicetree/bindings/arm/amlogic.yaml | 8 +
arch/arm64/boot/dts/amlogic/Makefile | 1 +
.../dts/amlogic/meson-s4-s805x2-aq222.dts | 2 +-
.../amlogic/meson-s4-s905y4-khadas-vim1s.dts | 190 ++++++++++++++++++
4 files changed, 200 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts
--
2.34.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 1/3] dt-bindings: arm: amlogic: introduce specific compatibles for S4 family
2026-01-15 3:00 [PATCH v3 0/3] arm64: dts: meson-s4: add support for Khadas VIM1S Nick Xie
@ 2026-01-15 3:00 ` Nick Xie
2026-01-15 9:27 ` Krzysztof Kozlowski
2026-01-15 3:00 ` [PATCH v3 2/3] arm64: dts: meson-s4-aq222: update compatible string with s805x2 Nick Xie
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Nick Xie @ 2026-01-15 3:00 UTC (permalink / raw)
To: neil.armstrong, khilman, jbrunet, martin.blumenstingl, devicetree,
linux-kernel, linux-arm-kernel, linux-amlogic
Cc: xianwei.zhao, christianshewitt, krzk+dt, robh, conor+dt, nick,
Nick Xie
The Amlogic S4 SoC family includes multiple variants, such as the S805X2
and S905Y4. Currently, the bindings only define the generic "amlogic,s4"
compatible.
This patch introduces specific compatibles "amlogic,s805x2" and
"amlogic,s905y4" to properly differentiate these SoCs while keeping
"amlogic,s4" as the family fallback.
This allows for more precise hardware description and future-proofing
if SoC-specific quirks arise.
Signed-off-by: Nick Xie <nick@khadas.com>
---
Documentation/devicetree/bindings/arm/amlogic.yaml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
index 08d9963fe9259..a885278bc4e2e 100644
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
@@ -245,6 +245,14 @@ properties:
items:
- enum:
- amlogic,aq222
+ - const: amlogic,s805x2
+ - const: amlogic,s4
+
+ - description: Boards with the Amlogic Meson S4 S905Y4 SoC
+ items:
+ - enum:
+ - khadas,vim1s
+ - const: amlogic,s905y4
- const: amlogic,s4
- description: Boards with the Amlogic S6 S905X5 SoC
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 2/3] arm64: dts: meson-s4-aq222: update compatible string with s805x2
2026-01-15 3:00 [PATCH v3 0/3] arm64: dts: meson-s4: add support for Khadas VIM1S Nick Xie
2026-01-15 3:00 ` [PATCH v3 1/3] dt-bindings: arm: amlogic: introduce specific compatibles for S4 family Nick Xie
@ 2026-01-15 3:00 ` Nick Xie
2026-01-15 10:25 ` neil.armstrong
2026-01-15 3:00 ` [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree Nick Xie
2026-01-15 10:36 ` [PATCH v3 0/3] arm64: dts: meson-s4: add support for Khadas VIM1S Neil Armstrong
3 siblings, 1 reply; 12+ messages in thread
From: Nick Xie @ 2026-01-15 3:00 UTC (permalink / raw)
To: neil.armstrong, khilman, jbrunet, martin.blumenstingl, devicetree,
linux-kernel, linux-arm-kernel, linux-amlogic
Cc: xianwei.zhao, christianshewitt, krzk+dt, robh, conor+dt, nick,
Nick Xie
Update the compatible string for the Amlogic AQ222 board to include
the specific SoC compatible "amlogic,s805x2".
This aligns the device tree with the updated bindings which now
differentiate between S4 family members (S805X2 vs S905Y4).
Signed-off-by: Nick Xie <nick@khadas.com>
---
arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts b/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts
index 6730c44642d29..0a3f81ea0fb0a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts
@@ -9,7 +9,7 @@
/ {
model = "Amlogic Meson S4 AQ222 Development Board";
- compatible = "amlogic,aq222", "amlogic,s4";
+ compatible = "amlogic,aq222", "amlogic,s805x2", "amlogic,s4";
interrupt-parent = <&gic>;
#address-cells = <2>;
#size-cells = <2>;
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree
2026-01-15 3:00 [PATCH v3 0/3] arm64: dts: meson-s4: add support for Khadas VIM1S Nick Xie
2026-01-15 3:00 ` [PATCH v3 1/3] dt-bindings: arm: amlogic: introduce specific compatibles for S4 family Nick Xie
2026-01-15 3:00 ` [PATCH v3 2/3] arm64: dts: meson-s4-aq222: update compatible string with s805x2 Nick Xie
@ 2026-01-15 3:00 ` Nick Xie
2026-01-15 10:25 ` neil.armstrong
2026-01-23 20:40 ` [DMARC error] " George Stark
2026-01-15 10:36 ` [PATCH v3 0/3] arm64: dts: meson-s4: add support for Khadas VIM1S Neil Armstrong
3 siblings, 2 replies; 12+ messages in thread
From: Nick Xie @ 2026-01-15 3:00 UTC (permalink / raw)
To: neil.armstrong, khilman, jbrunet, martin.blumenstingl, devicetree,
linux-kernel, linux-arm-kernel, linux-amlogic
Cc: xianwei.zhao, christianshewitt, krzk+dt, robh, conor+dt, nick,
Nick Xie
The Khadas VIM1S uses the Amlogic S905Y4 SoC, based on the
Amlogic S4 SoC family, on a board with the same form factor as the
VIM/VIM2/VIM3/VIM4 models. Serial debug console, ethernet, SD card
work with this initial device tree.
It features:
- 2GB LPDDR4 RAM
- 16GB eMMC 5.1 storage
- 32MB SPI flash
- 100M Ethernet
- AP6256 Wireless (802.11 a/b/g/n/ac, BT5.0)
- HDMI 2.1 video
- 2x USB 2.0 ports
- 1x USB-C (power) with USB 2.0 OTG
- 2x LED's (1x red, 1x white)
- 3x buttons (power, function, reset)
- IR receiver
- 40pin GPIO Header
- 1x micro SD card slot
Signed-off-by: Nick Xie <nick@khadas.com>
---
arch/arm64/boot/dts/amlogic/Makefile | 1 +
.../amlogic/meson-s4-s905y4-khadas-vim1s.dts | 190 ++++++++++++++++++
2 files changed, 191 insertions(+)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index 219fb088c704d..15f9c817e5023 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -85,6 +85,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-ugoos-am3.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-s4-s805x2-aq222.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-s4-s905y4-khadas-vim1s.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-gbit.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m2-pro.dtb
diff --git a/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts b/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts
new file mode 100644
index 0000000000000..79ffc703a2e99
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts
@@ -0,0 +1,190 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2026 Khadas Technology Co., Ltd.
+ */
+
+/dts-v1/;
+
+#include "meson-s4.dtsi"
+
+/ {
+ model = "Khadas VIM1S";
+ compatible = "khadas,vim1s", "amlogic,s905y4", "amlogic,s4";
+ interrupt-parent = <&gic>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ aliases {
+ mmc0 = &emmc; /* eMMC */
+ mmc1 = &sd; /* SD card */
+ mmc2 = &sdio; /* SDIO */
+ serial0 = &uart_b;
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x0 0x0 0x80000000>;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* 52 MiB reserved for ARM Trusted Firmware */
+ secmon_reserved: secmon@5000000 {
+ reg = <0x0 0x05000000 0x0 0x3400000>;
+ no-map;
+ };
+ };
+
+ sdio_32k: sdio-32k {
+ compatible = "pwm-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
+ };
+
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
+ clocks = <&sdio_32k>;
+ clock-names = "ext_clock";
+ };
+
+ main_5v: regulator-main-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "5V";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ sd_3v3: regulator-sd-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "SD_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio GPIOD_4 GPIO_ACTIVE_LOW>;
+ regulator-always-on;
+ };
+
+ vddio_sd: regulator-vddio-sd {
+ compatible = "regulator-gpio";
+ regulator-name = "VDDIO_SD";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ gpios = <&gpio GPIOD_9 GPIO_ACTIVE_HIGH>;
+ gpios-states = <1>;
+ states = <1800000 1
+ 3300000 0>;
+ };
+
+ /* SY8120B1ABC DC/DC Regulator. */
+ vddcpu: regulator-vddcpu {
+ compatible = "pwm-regulator";
+
+ regulator-name = "VDDCPU";
+ regulator-min-microvolt = <689000>;
+ regulator-max-microvolt = <1049000>;
+
+ vin-supply = <&main_5v>;
+
+ pwms = <&pwm_ij 1 1500 0>;
+ pwm-dutycycle-range = <100 0>;
+
+ regulator-boot-on;
+ regulator-always-on;
+ /* Voltage Duty-Cycle */
+ voltage-table = <1049000 0>,
+ <1039000 3>,
+ <1029000 6>,
+ <1019000 9>,
+ <1009000 12>,
+ <999000 14>,
+ <989000 17>,
+ <979000 20>,
+ <969000 23>,
+ <959000 26>,
+ <949000 29>,
+ <939000 31>,
+ <929000 34>,
+ <919000 37>,
+ <909000 40>,
+ <899000 43>,
+ <889000 45>,
+ <879000 48>,
+ <869000 51>,
+ <859000 54>,
+ <849000 56>,
+ <839000 59>,
+ <829000 62>,
+ <819000 65>,
+ <809000 68>,
+ <799000 70>,
+ <789000 73>,
+ <779000 76>,
+ <769000 79>,
+ <759000 81>,
+ <749000 84>,
+ <739000 87>,
+ <729000 89>,
+ <719000 92>,
+ <709000 95>,
+ <699000 98>,
+ <689000 100>;
+ };
+};
+
+ðmac {
+ status = "okay";
+ phy-handle = <&internal_ephy>;
+ phy-mode = "rmii";
+};
+
+&ir {
+ status = "okay";
+ pinctrl-0 = <&remote_pins>;
+ pinctrl-names = "default";
+};
+
+&pwm_ef {
+ status = "okay";
+ pinctrl-0 = <&pwm_e_pins1>;
+ pinctrl-names = "default";
+};
+
+&pwm_ij {
+ status = "okay";
+};
+
+&sd {
+ status = "okay";
+ pinctrl-0 = <&sdcard_pins>;
+ pinctrl-1 = <&sdcard_clk_gate_pins>;
+ pinctrl-names = "default", "clk-gate";
+ bus-width = <4>;
+ cap-sd-highspeed;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ max-frequency = <200000000>;
+ disable-wp;
+
+ cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
+
+ vmmc-supply = <&sd_3v3>;
+ vqmmc-supply = <&vddio_sd>;
+};
+
+&spicc0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spicc0_pins_x>;
+ cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>;
+};
+
+&uart_b {
+ status = "okay";
+};
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: arm: amlogic: introduce specific compatibles for S4 family
2026-01-15 3:00 ` [PATCH v3 1/3] dt-bindings: arm: amlogic: introduce specific compatibles for S4 family Nick Xie
@ 2026-01-15 9:27 ` Krzysztof Kozlowski
0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-15 9:27 UTC (permalink / raw)
To: Nick Xie
Cc: neil.armstrong, khilman, jbrunet, martin.blumenstingl, devicetree,
linux-kernel, linux-arm-kernel, linux-amlogic, xianwei.zhao,
christianshewitt, krzk+dt, robh, conor+dt, nick
On Thu, Jan 15, 2026 at 11:00:13AM +0800, Nick Xie wrote:
> The Amlogic S4 SoC family includes multiple variants, such as the S805X2
> and S905Y4. Currently, the bindings only define the generic "amlogic,s4"
> compatible.
>
> This patch introduces specific compatibles "amlogic,s805x2" and
> "amlogic,s905y4" to properly differentiate these SoCs while keeping
> "amlogic,s4" as the family fallback.
>
> This allows for more precise hardware description and future-proofing
> if SoC-specific quirks arise.
>
> Signed-off-by: Nick Xie <nick@khadas.com>
> ---
> Documentation/devicetree/bindings/arm/amlogic.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/3] arm64: dts: meson-s4-aq222: update compatible string with s805x2
2026-01-15 3:00 ` [PATCH v3 2/3] arm64: dts: meson-s4-aq222: update compatible string with s805x2 Nick Xie
@ 2026-01-15 10:25 ` neil.armstrong
0 siblings, 0 replies; 12+ messages in thread
From: neil.armstrong @ 2026-01-15 10:25 UTC (permalink / raw)
To: Nick Xie, khilman, jbrunet, martin.blumenstingl, devicetree,
linux-kernel, linux-arm-kernel, linux-amlogic
Cc: xianwei.zhao, christianshewitt, krzk+dt, robh, conor+dt, nick
On 1/15/26 04:00, Nick Xie wrote:
> Update the compatible string for the Amlogic AQ222 board to include
> the specific SoC compatible "amlogic,s805x2".
>
> This aligns the device tree with the updated bindings which now
> differentiate between S4 family members (S805X2 vs S905Y4).
>
> Signed-off-by: Nick Xie <nick@khadas.com>
> ---
> arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts b/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts
> index 6730c44642d29..0a3f81ea0fb0a 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-s4-s805x2-aq222.dts
> @@ -9,7 +9,7 @@
>
> / {
> model = "Amlogic Meson S4 AQ222 Development Board";
> - compatible = "amlogic,aq222", "amlogic,s4";
> + compatible = "amlogic,aq222", "amlogic,s805x2", "amlogic,s4";
> interrupt-parent = <&gic>;
> #address-cells = <2>;
> #size-cells = <2>;
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree
2026-01-15 3:00 ` [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree Nick Xie
@ 2026-01-15 10:25 ` neil.armstrong
2026-01-23 20:40 ` [DMARC error] " George Stark
1 sibling, 0 replies; 12+ messages in thread
From: neil.armstrong @ 2026-01-15 10:25 UTC (permalink / raw)
To: Nick Xie, khilman, jbrunet, martin.blumenstingl, devicetree,
linux-kernel, linux-arm-kernel, linux-amlogic
Cc: xianwei.zhao, christianshewitt, krzk+dt, robh, conor+dt, nick
On 1/15/26 04:00, Nick Xie wrote:
> The Khadas VIM1S uses the Amlogic S905Y4 SoC, based on the
> Amlogic S4 SoC family, on a board with the same form factor as the
> VIM/VIM2/VIM3/VIM4 models. Serial debug console, ethernet, SD card
> work with this initial device tree.
>
> It features:
> - 2GB LPDDR4 RAM
> - 16GB eMMC 5.1 storage
> - 32MB SPI flash
> - 100M Ethernet
> - AP6256 Wireless (802.11 a/b/g/n/ac, BT5.0)
> - HDMI 2.1 video
> - 2x USB 2.0 ports
> - 1x USB-C (power) with USB 2.0 OTG
> - 2x LED's (1x red, 1x white)
> - 3x buttons (power, function, reset)
> - IR receiver
> - 40pin GPIO Header
> - 1x micro SD card slot
>
> Signed-off-by: Nick Xie <nick@khadas.com>
> ---
> arch/arm64/boot/dts/amlogic/Makefile | 1 +
> .../amlogic/meson-s4-s905y4-khadas-vim1s.dts | 190 ++++++++++++++++++
> 2 files changed, 191 insertions(+)
> create mode 100644 arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts
>
> diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
> index 219fb088c704d..15f9c817e5023 100644
> --- a/arch/arm64/boot/dts/amlogic/Makefile
> +++ b/arch/arm64/boot/dts/amlogic/Makefile
> @@ -85,6 +85,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-ugoos-am3.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-s4-s805x2-aq222.dtb
> +dtb-$(CONFIG_ARCH_MESON) += meson-s4-s905y4-khadas-vim1s.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-gbit.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air.dtb
> dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m2-pro.dtb
> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts b/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts
> new file mode 100644
> index 0000000000000..79ffc703a2e99
> --- /dev/null
> +++ b/arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts
> @@ -0,0 +1,190 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (c) 2026 Khadas Technology Co., Ltd.
> + */
> +
> +/dts-v1/;
> +
> +#include "meson-s4.dtsi"
> +
> +/ {
> + model = "Khadas VIM1S";
> + compatible = "khadas,vim1s", "amlogic,s905y4", "amlogic,s4";
> + interrupt-parent = <&gic>;
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + aliases {
> + mmc0 = &emmc; /* eMMC */
> + mmc1 = &sd; /* SD card */
> + mmc2 = &sdio; /* SDIO */
> + serial0 = &uart_b;
> + };
> +
> + memory@0 {
> + device_type = "memory";
> + reg = <0x0 0x0 0x0 0x80000000>;
> + };
> +
> + reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + /* 52 MiB reserved for ARM Trusted Firmware */
> + secmon_reserved: secmon@5000000 {
> + reg = <0x0 0x05000000 0x0 0x3400000>;
> + no-map;
> + };
> + };
> +
> + sdio_32k: sdio-32k {
> + compatible = "pwm-clock";
> + #clock-cells = <0>;
> + clock-frequency = <32768>;
> + pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
> + };
> +
> + sdio_pwrseq: sdio-pwrseq {
> + compatible = "mmc-pwrseq-simple";
> + reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
> + clocks = <&sdio_32k>;
> + clock-names = "ext_clock";
> + };
> +
> + main_5v: regulator-main-5v {
> + compatible = "regulator-fixed";
> + regulator-name = "5V";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + regulator-always-on;
> + };
> +
> + sd_3v3: regulator-sd-3v3 {
> + compatible = "regulator-fixed";
> + regulator-name = "SD_3V3";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + gpio = <&gpio GPIOD_4 GPIO_ACTIVE_LOW>;
> + regulator-always-on;
> + };
> +
> + vddio_sd: regulator-vddio-sd {
> + compatible = "regulator-gpio";
> + regulator-name = "VDDIO_SD";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <3300000>;
> + gpios = <&gpio GPIOD_9 GPIO_ACTIVE_HIGH>;
> + gpios-states = <1>;
> + states = <1800000 1
> + 3300000 0>;
> + };
> +
> + /* SY8120B1ABC DC/DC Regulator. */
> + vddcpu: regulator-vddcpu {
> + compatible = "pwm-regulator";
> +
> + regulator-name = "VDDCPU";
> + regulator-min-microvolt = <689000>;
> + regulator-max-microvolt = <1049000>;
> +
> + vin-supply = <&main_5v>;
> +
> + pwms = <&pwm_ij 1 1500 0>;
> + pwm-dutycycle-range = <100 0>;
> +
> + regulator-boot-on;
> + regulator-always-on;
> + /* Voltage Duty-Cycle */
> + voltage-table = <1049000 0>,
> + <1039000 3>,
> + <1029000 6>,
> + <1019000 9>,
> + <1009000 12>,
> + <999000 14>,
> + <989000 17>,
> + <979000 20>,
> + <969000 23>,
> + <959000 26>,
> + <949000 29>,
> + <939000 31>,
> + <929000 34>,
> + <919000 37>,
> + <909000 40>,
> + <899000 43>,
> + <889000 45>,
> + <879000 48>,
> + <869000 51>,
> + <859000 54>,
> + <849000 56>,
> + <839000 59>,
> + <829000 62>,
> + <819000 65>,
> + <809000 68>,
> + <799000 70>,
> + <789000 73>,
> + <779000 76>,
> + <769000 79>,
> + <759000 81>,
> + <749000 84>,
> + <739000 87>,
> + <729000 89>,
> + <719000 92>,
> + <709000 95>,
> + <699000 98>,
> + <689000 100>;
> + };
> +};
> +
> +ðmac {
> + status = "okay";
> + phy-handle = <&internal_ephy>;
> + phy-mode = "rmii";
> +};
> +
> +&ir {
> + status = "okay";
> + pinctrl-0 = <&remote_pins>;
> + pinctrl-names = "default";
> +};
> +
> +&pwm_ef {
> + status = "okay";
> + pinctrl-0 = <&pwm_e_pins1>;
> + pinctrl-names = "default";
> +};
> +
> +&pwm_ij {
> + status = "okay";
> +};
> +
> +&sd {
> + status = "okay";
> + pinctrl-0 = <&sdcard_pins>;
> + pinctrl-1 = <&sdcard_clk_gate_pins>;
> + pinctrl-names = "default", "clk-gate";
> + bus-width = <4>;
> + cap-sd-highspeed;
> + sd-uhs-sdr12;
> + sd-uhs-sdr25;
> + sd-uhs-sdr50;
> + sd-uhs-sdr104;
> + max-frequency = <200000000>;
> + disable-wp;
> +
> + cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
> +
> + vmmc-supply = <&sd_3v3>;
> + vqmmc-supply = <&vddio_sd>;
> +};
> +
> +&spicc0 {
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&spicc0_pins_x>;
> + cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_LOW>;
> +};
> +
> +&uart_b {
> + status = "okay";
> +};
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 0/3] arm64: dts: meson-s4: add support for Khadas VIM1S
2026-01-15 3:00 [PATCH v3 0/3] arm64: dts: meson-s4: add support for Khadas VIM1S Nick Xie
` (2 preceding siblings ...)
2026-01-15 3:00 ` [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree Nick Xie
@ 2026-01-15 10:36 ` Neil Armstrong
3 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2026-01-15 10:36 UTC (permalink / raw)
To: khilman, jbrunet, martin.blumenstingl, devicetree, linux-kernel,
linux-arm-kernel, linux-amlogic, Nick Xie
Cc: xianwei.zhao, christianshewitt, krzk+dt, robh, conor+dt, nick
Hi,
On Thu, 15 Jan 2026 11:00:12 +0800, Nick Xie wrote:
> This series adds initial support for the Khadas VIM1S single board computer.
>
> The Khadas VIM1S is based on the Amlogic S905Y4 (S4 family) SoC.
> It features:
> - 2GB LPDDR4 RAM
> - 16GB eMMC 5.1 storage
> - 32MB SPI flash
> - 100M Ethernet
> - AP6256 Wireless (802.11 a/b/g/n/ac, BT5.0)
> - HDMI 2.1 video
> - 2x USB 2.0 ports
> - 1x USB-C (power) with USB 2.0 OTG
> - 2x LED's (1x red, 1x white)
> - 3x buttons (power, function, reset)
> - IR receiver
> - 40pin GPIO Header
> - 1x micro SD card slot
>
> [...]
Thanks, Applied to https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git (v6.20/arm64-dt)
[1/3] dt-bindings: arm: amlogic: introduce specific compatibles for S4 family
https://git.kernel.org/amlogic/c/fee65328ab35d5491ac5c9c697c52da3fd068268
[2/3] arm64: dts: meson-s4-aq222: update compatible string with s805x2
https://git.kernel.org/amlogic/c/9ba73c18b14ac297b9fae92b684ca4dafa5e0361
[3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree
https://git.kernel.org/amlogic/c/6186af6bd9b1e778e295a176c9281dba970da7eb
These changes has been applied on the intermediate git tree [1].
The v6.20/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
--
Neil
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [DMARC error] [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree
2026-01-15 3:00 ` [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree Nick Xie
2026-01-15 10:25 ` neil.armstrong
@ 2026-01-23 20:40 ` George Stark
2026-01-26 9:35 ` 回复: " Nick Xie
1 sibling, 1 reply; 12+ messages in thread
From: George Stark @ 2026-01-23 20:40 UTC (permalink / raw)
To: Nick Xie
Cc: robh, khilman, jbrunet, martin.blumenstingl, neil.armstrong,
devicetree, linux-amlogic, conor+dt, kernel@salutedevices.com,
linux-arm-kernel, krzk+dt, xianwei.zhao, linux-kernel, nick
Hello Nick
On 1/15/26 06:00, Nick Xie wrote:
> The Khadas VIM1S uses the Amlogic S905Y4 SoC, based on the
> Amlogic S4 SoC family, on a board with the same form factor as the
> VIM/VIM2/VIM3/VIM4 models. Serial debug console, ethernet, SD card
> work with this initial device tree.
...
> + };
> +
> + /* SY8120B1ABC DC/DC Regulator. */
> + vddcpu: regulator-vddcpu {
> + compatible = "pwm-regulator";
> +
> + regulator-name = "VDDCPU";
> + regulator-min-microvolt = <689000>;
> + regulator-max-microvolt = <1049000>;
> +
> + vin-supply = <&main_5v>;
> +
> + pwms = <&pwm_ij 1 1500 0>;
> + pwm-dutycycle-range = <100 0>;
> +
> + regulator-boot-on;
> + regulator-always-on;
> + /* Voltage Duty-Cycle */
> + voltage-table = <1049000 0>,
> + <1039000 3>,
> + <1029000 6>,
> + <1019000 9>,
> + <1009000 12>,
> + <999000 14>,
> + <989000 17>,
> + <979000 20>,
> + <969000 23>,
> + <959000 26>,
> + <949000 29>,
> + <939000 31>,
> + <929000 34>,
> + <919000 37>,
> + <909000 40>,
> + <899000 43>,
> + <889000 45>,
> + <879000 48>,
> + <869000 51>,
> + <859000 54>,
> + <849000 56>,
> + <839000 59>,
> + <829000 62>,
> + <819000 65>,
> + <809000 68>,
> + <799000 70>,
> + <789000 73>,
> + <779000 76>,
> + <769000 79>,
> + <759000 81>,
> + <749000 84>,
> + <739000 87>,
> + <729000 89>,
> + <719000 92>,
> + <709000 95>,
> + <699000 98>,
> + <689000 100>;
> + };
> +};
Thanks for the patch. Since you have khadas mail I'm pretty sure you've
had the possibility to test it on the real vim board and I just don't
get it how it works with the voltage table above. The problem is that
pwm is calculated incorrectly in the upstream pwm-meson driver. That
voltage table appeared to be used in early amlogic bl loader and
appropriate pwm is initialized from a table's record. Duty cycle value
is translated to pwm regs correctly. Later when kernel start running
pwm-regulator driver is probed. It reads the pwm regs, calculates back
duty-cyle and search it in the table. Since calculation algos are not
match and the table doesn't contain full range of 0-100% values
regulator driver doesn't find current voltage. In such case regulator
core sets the minimum voltage from the table [1] and the SoC may hang
(depending on board) due to minimum voltage may be too low for the
current frequency SoC uses.
Or I'm missing something?
There's not-yet-reviewed patch that fixes pwm algo [2]. There's
calculation example in the cover letter.
[1]
https://elixir.bootlin.com/linux/v6.19-rc5/source/drivers/regulator/core.c#L1227
[2] https://lkml.iu.edu/2412.3/00826.html
--
Best regards
George
^ permalink raw reply [flat|nested] 12+ messages in thread
* 回复: [DMARC error] [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree
2026-01-23 20:40 ` [DMARC error] " George Stark
@ 2026-01-26 9:35 ` Nick Xie
2026-01-29 14:48 ` George Stark
0 siblings, 1 reply; 12+ messages in thread
From: Nick Xie @ 2026-01-26 9:35 UTC (permalink / raw)
To: George Stark
Cc: robh@kernel.org, khilman@baylibre.com, jbrunet@baylibre.com,
martin.blumenstingl@googlemail.com, neil.armstrong@linaro.org,
devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
conor+dt@kernel.org, kernel@salutedevices.com,
linux-arm-kernel@lists.infradead.org, krzk+dt@kernel.org,
xianwei.zhao@amlogic.com, linux-kernel@vger.kernel.org,
nick@xieqinick.com
> Thanks for the patch. Since you have khadas mail I'm pretty sure you've
> had the possibility to test it on the real vim board and I just don't
> get it how it works with the voltage table above. The problem is that
> pwm is calculated incorrectly in the upstream pwm-meson driver. That
> voltage table appeared to be used in early amlogic bl loader and
> appropriate pwm is initialized from a table's record. Duty cycle value
> is translated to pwm regs correctly. Later when kernel start running
> pwm-regulator driver is probed. It reads the pwm regs, calculates back
> duty-cyle and search it in the table. Since calculation algos are not
> match and the table doesn't contain full range of 0-100% values
> regulator driver doesn't find current voltage. In such case regulator
> core sets the minimum voltage from the table [1] and the SoC may hang
> (depending on board) due to minimum voltage may be too low for the
> current frequency SoC uses.
I'm not sure about the PWM issues, but I checked on the real S905Y4 hardware
and it works.
> Or I'm missing something?
> There's not-yet-reviewed patch that fixes pwm algo [2]. There's
> calculation example in the cover letter.
> [1] https://elixir.bootlin.com/linux/v6.19-rc5/source/drivers/regulator/core.c#L1227
> [2] https://lkml.iu.edu/2412.3/00826.html
What's the status of such patches?
--
Best regards
George
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 回复: [DMARC error] [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree
2026-01-26 9:35 ` 回复: " Nick Xie
@ 2026-01-29 14:48 ` George Stark
[not found] ` <CAFBinCDcDy4M79+mM+axsqXLfoQ56Ucd1C-OHkGLxwNkpfZ-zQ@mail.gmail.com>
0 siblings, 1 reply; 12+ messages in thread
From: George Stark @ 2026-01-29 14:48 UTC (permalink / raw)
To: Nick Xie
Cc: robh@kernel.org, khilman@baylibre.com, jbrunet@baylibre.com,
martin.blumenstingl@googlemail.com, neil.armstrong@linaro.org,
devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
conor+dt@kernel.org, kernel@salutedevices.com,
linux-arm-kernel@lists.infradead.org, krzk+dt@kernel.org,
xianwei.zhao@amlogic.com, linux-kernel@vger.kernel.org
On 1/26/26 12:35, Nick Xie wrote:
>> Thanks for the patch. Since you have khadas mail I'm pretty sure you've
>> had the possibility to test it on the real vim board and I just don't
>> get it how it works with the voltage table above. The problem is that
>> pwm is calculated incorrectly in the upstream pwm-meson driver. That
>> voltage table appeared to be used in early amlogic bl loader and
>> appropriate pwm is initialized from a table's record. Duty cycle value
>> is translated to pwm regs correctly. Later when kernel start running
>> pwm-regulator driver is probed. It reads the pwm regs, calculates back
>> duty-cyle and search it in the table. Since calculation algos are not
>> match and the table doesn't contain full range of 0-100% values
>> regulator driver doesn't find current voltage. In such case regulator
>> core sets the minimum voltage from the table [1] and the SoC may hang
>> (depending on board) due to minimum voltage may be too low for the
>> current frequency SoC uses.
>
> I'm not sure about the PWM issues, but I checked on the real S905Y4 hardware
> and it works.
To prove my point: run the kernel with the next patch:
diff --git a/drivers/regulator/pwm-regulator.c
b/drivers/regulator/pwm-regulator.c
index 7434b6b22d32..14d2730b21e8 100644
--- a/drivers/regulator/pwm-regulator.c
+++ b/drivers/regulator/pwm-regulator.c
@@ -86,6 +86,9 @@ static int pwm_regulator_set_voltage_sel(struct
regulator_dev *rdev,
struct pwm_state pstate;
int ret;
+ dev_info(&rdev->dev, "setting voltage from table: index: %u, uV:
%u\n",
+ selector, drvdata->duty_cycle_table[selector].uV);
+
pwm_init_state(drvdata->pwm, &pstate);
pwm_set_relative_duty_cycle(&pstate,
drvdata->duty_cycle_table[selector].dutycycle,
100);
In dmesg there must be a message like "setting voltage from table:
index: 36, uV: 689000"
If to take a look at operation points table for s4 in vendor kernels the
lowest voltage is 0.769V for 100Mhz
so setting 689000uV even temporary may lead to problems depending on
particular hardware.
>> Or I'm missing something?
>
>
>> There's not-yet-reviewed patch that fixes pwm algo [2]. There's
>> calculation example in the cover letter.
>> [1] https://elixir.bootlin.com/linux/v6.19-rc5/source/drivers/regulator/core.c#L1227
>> [2] https://lkml.iu.edu/2412.3/00826.html
>
> What's the status of such patches?
the patch is ready for review. It's seems like nobody is interested
> --
>
> Best regards
>
> George
>
--
Best regards
George
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: 回复: [DMARC error] [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree
[not found] ` <CAFBinCDcDy4M79+mM+axsqXLfoQ56Ucd1C-OHkGLxwNkpfZ-zQ@mail.gmail.com>
@ 2026-02-13 11:00 ` George Stark
0 siblings, 0 replies; 12+ messages in thread
From: George Stark @ 2026-02-13 11:00 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: Nick Xie, robh@kernel.org, khilman@baylibre.com,
jbrunet@baylibre.com, neil.armstrong@linaro.org,
devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
conor+dt@kernel.org, kernel@salutedevices.com,
linux-arm-kernel@lists.infradead.org, krzk+dt@kernel.org,
xianwei.zhao@amlogic.com, linux-kernel@vger.kernel.org
On 2/10/26 01:31, Martin Blumenstingl wrote:
> Hi George,
>
> sorry for the late reply.
>
> On Thu, Jan 29, 2026 at 3:48 PM George Stark <gnstark@salutedevices.com> wrote:
Hello Martin. It's great to hear from you again.
>>
>>
>> On 1/26/26 12:35, Nick Xie wrote:
>>>> Thanks for the patch. Since you have khadas mail I'm pretty sure you've
>>>> had the possibility to test it on the real vim board and I just don't
>>>> get it how it works with the voltage table above. The problem is that
>>>> pwm is calculated incorrectly in the upstream pwm-meson driver. That
>>>> voltage table appeared to be used in early amlogic bl loader and
>>>> appropriate pwm is initialized from a table's record. Duty cycle value
>>>> is translated to pwm regs correctly. Later when kernel start running
>>>> pwm-regulator driver is probed. It reads the pwm regs, calculates back
>>>> duty-cyle and search it in the table. Since calculation algos are not
>>>> match and the table doesn't contain full range of 0-100% values
>>>> regulator driver doesn't find current voltage. In such case regulator
>>>> core sets the minimum voltage from the table [1] and the SoC may hang
>>>> (depending on board) due to minimum voltage may be too low for the
>>>> current frequency SoC uses.
> Nick likely didn't spot any issues on S4 since CPU frequency scaling
> is not upstreamed yet (as there's no way to control the CPU clock
> yet).
> The lack of a OPP table means: the PWM and CPU clock will just stay at
> whatever the bootloader provides
It makes sense. I should experiment on the latest kernel.
>>>> Or I'm missing something?
>>>
>>>
>>>> There's not-yet-reviewed patch that fixes pwm algo [2]. There's
>>>> calculation example in the cover letter.
>>>> [1] https://elixir.bootlin.com/linux/v6.19-rc5/source/drivers/regulator/core.c#L1227
>>>> [2] https://lkml.iu.edu/2412.3/00826.html
>>>
>>> What's the status of such patches?
>>
>> the patch is ready for review. It's seems like nobody is interested
> I'm sorry to see that the patch had it's first anniversary.
> I'll need to bring out my logic analyzer and test your patch (I hope
> it's precise enough to show the impact of your changes).
> Are your plans then to re-send the patches or have you moved on and
> need someone else to take care of it?
It's a major step anyway if you confirm the issue yourself with an
analyzer. In that case discussion won't be delayed for one more year
I think. Thanks.
Sure I'm ready to discuss/fix/resend this patch.
--
Best regards
George
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-02-13 11:00 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-15 3:00 [PATCH v3 0/3] arm64: dts: meson-s4: add support for Khadas VIM1S Nick Xie
2026-01-15 3:00 ` [PATCH v3 1/3] dt-bindings: arm: amlogic: introduce specific compatibles for S4 family Nick Xie
2026-01-15 9:27 ` Krzysztof Kozlowski
2026-01-15 3:00 ` [PATCH v3 2/3] arm64: dts: meson-s4-aq222: update compatible string with s805x2 Nick Xie
2026-01-15 10:25 ` neil.armstrong
2026-01-15 3:00 ` [PATCH v3 3/3] arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree Nick Xie
2026-01-15 10:25 ` neil.armstrong
2026-01-23 20:40 ` [DMARC error] " George Stark
2026-01-26 9:35 ` 回复: " Nick Xie
2026-01-29 14:48 ` George Stark
[not found] ` <CAFBinCDcDy4M79+mM+axsqXLfoQ56Ucd1C-OHkGLxwNkpfZ-zQ@mail.gmail.com>
2026-02-13 11:00 ` George Stark
2026-01-15 10:36 ` [PATCH v3 0/3] arm64: dts: meson-s4: add support for Khadas VIM1S Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox