Commit Graph

1125 Commits

Author SHA1 Message Date
Lucas Tanure
406292fd75 arm64: dts: amlogic: t7: fix the pin groups of the vsync PWM
The vsync PWM output can appear on either of two pins, but the
description named a single group that does not exist, so anything using
it would refuse to start.

Name the real groups instead, one entry per pin. No board describes this
output yet, so nothing changes today.

Fixes: 2a2a7b9701 ("arm64: dts: amlogic: t7: Add PWM pinctrl nodes")
Assisted-by: Claude:claude-opus-5
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260829094758.23248-5-tanure@linux.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-08-31 14:42:59 +02:00
Lucas Tanure
1e5a53bd16 arm64: dts: amlogic: t7: khadas-vim4: add the PWM-driven supplies
The board powers its two CPU clusters, the GPU, the NPU, the memory and
the always-on domain from regulators steered by PWM outputs. None of
them were described, so Linux treated those outputs as unused and
switched them off part way through boot. The supplies then drifted away
from the levels the bootloader had set, which showed up as random hangs
and memory corruption.

Describe each supply so it has an owner and is left alone.

The voltage ranges are read off the feedback networks on the board
schematic. VDDNPU is deliberately not the range in Amlogic's own
device tree: this board fits a different feedback resistor, which
puts it about 40mV higher at both ends.

Fixes: 8c45bf9ae4 ("arm64: dts: amlogic: t7: khadas-vim4: Add power regulators")
Assisted-by: Claude:claude-opus-5
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260829094758.23248-4-tanure@linux.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-08-31 14:42:58 +02:00
Lucas Tanure
ae7be5c58a arm64: dts: amlogic: t7: fix the pin groups of two PWM outputs
Two of the PWM outputs can each appear on more than one pin, but the
description named a single group that does not exist, so anything using
it refused to start.

Name the real groups instead, one entry per pin, the same way the other
multi-pin PWM output is already described.

Fixes: 2a2a7b9701 ("arm64: dts: amlogic: t7: Add PWM pinctrl nodes")
Assisted-by: Claude:claude-opus-5
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260829094758.23248-3-tanure@linux.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-08-31 14:42:58 +02:00
Lucas Tanure
c793a084ab arm64: dts: amlogic: t7: khadas-vim4: allow the SD card to be power cycled
SD cards start at 3.3V and switch to 1.8V to reach UHS-I speeds. Some
cards refuse that switch, and the SD specification says the only way
to recover is to power the card off and start again.

SD_3V3 is marked regulator-always-on, so the supply never goes off,
the card stays stuck half way through the switch, and the MMC core
retries forever:

  mmc1: error -95 whilst initialising SD card

Drop regulator-always-on. regulator-boot-on still turns the supply on
at boot, and a card that refuses the switch now falls back to high
speed instead of failing to initialise.

Fixes: 8c45bf9ae4 ("arm64: dts: amlogic: t7: khadas-vim4: Add power regulators")
Signed-off-by: Lucas Tanure <tanure@linux.com>
Assisted-by: Claude:claude-fable-5
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260823115335.102219-3-tanure@linux.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-08-31 14:37:48 +02:00
Lucas Tanure
882de800bf arm64: dts: amlogic: t7: use the real UART pclk
uart_a listed the 24MHz crystal for all three of its clocks because the
T7 clock controller driver did not exist when these boards were added.

That leaves the real UART bus clock without a user, so the kernel
turns it off when it disables unused clocks at the end of boot, and
the board hangs.

Update the board DTS files to point uart_a's pclk to CLKID_SYS_UART_A
instead of the dummy crystal clock.

Fixes: 4fef056588 ("arm64: dts: amlogic-t7-a311d2-khadas-vim4: add initial device-tree")
Fixes: 6f048cc7a6 ("arm64: dts: add board AN400")
Signed-off-by: Lucas Tanure <tanure@linux.com>
Assisted-by: Claude:claude-fable-5
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260823115335.102219-2-tanure@linux.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-08-31 14:37:48 +02:00
Arnd Bergmann
658ed6d54e Minor improvements in arm64 DTS for v7.3
Several non-functional (white-space and style) changes to match with DTS
 coding style as reported by recent dt-check-style tool.  Goal is to get
 to no `dt-check-style --mode strict` warnings over time.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmp0RMQQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1wL5D/9pJn/QpXraZ9Mo6aY80EO6Ufun1uz+f2lM
 Jp9V/O3cUFoc3+EgGcp4oh7JbwGdfEnad2pVm+CQjpSZL6uuBNCHO9WtIcGeL63t
 k9xL1/7KttPmZBSCNfB2AUKFPPyhbUr+Fk3CjYUR5mAxsa5PgivJZSIE+JQ8RN6t
 rByp6qip9cyfguuQLi7xVUou5n5nQcSJPqntCsgVm0Wk1nD/gyTxuyxDp2SGt9Rs
 U9CobD6YuQi8TGpjFtBNALq98isZmuAF75mgYz2RHEtjYKmXGDl/a4TZ7K3295Qc
 /ZkeLvnmWaLVnoQAaGKlb3cuEgvuuZumFThPj0jwmVQn153B6UPN/M9TVfrqgpG4
 Scbh2+CEb3DGRCjsmEaDtT5qZnb+xv42wW79V/MDqVQaDN8kiUxAaT0/DNPaBCJN
 A3J9BnJgEN6qXDt5ZTMo7OqQB2GUra4SOoWD+6F92zWBLHyAagfc39V9IlTA1I2b
 i0kfmYPRr3ooqYf2eNQPnuftUqPqlvWeJKK+tczn1GPQnaDmcvIC6V0M8qTiW3CK
 UJlogvgQqYfap2Cq9ZhjyYrVXZ0H+VqlSw2xCoezdggDQBmzP9K3JsvMe8DmCRXK
 uOoKEXLrAJ5krINZuVbY0L9VYH4lYtV5Kof0WXPumyYmmpIObQrGtipJKdc4CFSQ
 ymzW0L79Aw==
 =GPP3
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmp59ekACgkQmmx57+YA
 GNkT8RAAkONJBU/GkXcmT+RclfTwZ19FZO9Pq7p7gtOLkJg1GrE1//gIcG8stpp6
 1Z9OPoF3PIonN36O8in7PARSmQlltqojSFdJ6lA26g9U8DwsMTQ9g7VKgewCxMDi
 23zFVCOpKxSHsQlw8nGpIWKcrceUyTsZlyPG3mete95LeoJncxr63uf9NJOGTfWq
 gYtC5/amVCyl2ZvXE8YTaWVXNZBa8D/9Ea4y5ZtoLT37vSqkRjE1bFo2qWfTLT5Q
 Iex7iormr+jnIP+FSeMNWQomWpeKuE7O5NhkLrygCZsguPe5pgDDx11GYFZW541N
 OKhtYe02A7PVnfkapwRG2vPchytSCWVVzcRnVfzNEqjIec2WjZQ+BkeSD3uLL+lu
 DyZGAKmuWcMIdFQ6xsZolRpqkHb2CLnmMbiUDf5mNisa3uqJHqHyxv4jft7mRK2k
 tNawkqFsOnf440yP8pPYB8FIP+79+LTaU4rIg54X8aC0SXpj8ImARG8ud10pwy7C
 6Jj8nBGHqTFQgKrVfwC53MGw876/iW09ZK0ZFBdCwmH5MtKBX7cTA8Y1Tk8DYvdt
 dVKUQFAKeK80J/M52ARQPcG+BPVagej6cSyvp2cMUvinhxGczrW3SpGn3nhG2iZK
 QmPjhGUydB20d+Gah6e2YP7sH0MZn66E/FyodhuRgGTURqZjpKM=
 =mVJT
 -----END PGP SIGNATURE-----

Merge tag 'dt64-cleanup-7.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt

Minor improvements in arm64 DTS for v7.3

Several non-functional (white-space and style) changes to match with DTS
coding style as reported by recent dt-check-style tool.  Goal is to get
to no `dt-check-style --mode strict` warnings over time.

* tag 'dt64-cleanup-7.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt:
  arm64: dts: Correct white-space style
  arm64: dts: amd: seattle: Remove useless xgbe DTSI include
  arm64: dts: amd: seattle: Remove useless clocks DTSI include

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-08-10 18:01:37 +02:00
Krzysztof Kozlowski
7c78d6fa9a arm64: dts: Correct white-space style
Correct a few white-space issues, like missing space before bracket '{'
character or spurious space, which will be flagged by dt-check-style
("redundant-whitespace" warning).  No functional changes.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Michal Simek <michal.simek@amd.com> # Versal NET
Acked-by: Sven Peter <sven@kernel.org> # for apple dts
Link: https://patch.msgid.link/20260801210210.383417-4-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2026-08-04 08:10:49 +02:00
Jun Yan
7f1d0cc86c arm64: dts: amlogic: meson-axg-s400: enable mipi_pcie_analog_dphy for PCIe
The PCIe PHY node references mipi_pcie_analog_dphy via its phys property.
Enable this analog PHY node to make PCIe functionally viable.

Fixes: 9715b01da6 ("arm64: dts: meson-axg-s400: enable PCIe M.2 Key E slots")
Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260624135650.727077-5-jerrysteve1101@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-07-20 14:31:02 +02:00
Jun Yan
25ab968f7d arm64: dts: amlogic: meson-axg: Disable pcie_phy node by default
Set the pcie_phy node to "disabled" as it is not used on some boards
and should be enabled per-board when necessary.

This change suppresses the deferred probe warning:

platform ff644000.phy: deferred probe pending: (reason unknown)

The meson-axg dtsi now disables pcie_phy by default, so enable it
for the s400 board to support PCIe functionality.

Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260624135650.727077-4-jerrysteve1101@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-07-20 14:31:02 +02:00
Jun Yan
45eb76f9ab arm64: dts: amlogic: meson-axg: Add missing nand_rb0 pin to nand_all_pins
The nand_all_pins pinctrl node was missing the nand_rb0 (ready/busy)
pin description, which is required for NAND controller operation.

Add it to the pinmux list.

Fixes: be18d53c32 ("arm64: dts: amlogic: meson-axg: pinctrl node for NAND")
Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260624135650.727077-3-jerrysteve1101@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-07-20 14:31:01 +02:00
Jun Yan
77c63ef3be arm64: dts: amlogic: meson-axg: Disable nfc node by default
nand_rb0 and emmc_ds share one pad. Before enabling nand_rb0 for nfc,
disable nfc nodes by default to resolve pinctrl resource contention.

No mainline AXG boards enable nfc currently thus no extra DTS adjustments
are needed.

Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260624135650.727077-2-jerrysteve1101@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-07-20 14:31:01 +02:00
Krzysztof Kozlowski
6c4345eb71 arm64: dts: amlogic: Correct indentation and whitespace
Correct spaces or mix of tabs+spaces into proper tab-indented lines and
remove other whitespace violations.  No functional impact (same DTB).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260706093508.273968-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-07-20 14:30:42 +02:00
Xianwei Zhao
3ecd66ea25 arm64: dts: amlogic: add some device nodes for A9
Add pinctrl and irqchip-gpio device nodes for A9 SoC.

Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
Link: https://patch.msgid.link/20260629-a9-node-v2-1-dadd3401fccb@amlogic.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-07-03 11:53:38 +02:00
Jian Hu
d0a92020bb arm64: dts: amlogic: t7: Add clk measure support
Add the clock measure device to the T7 SoC family.

Signed-off-by: Jian Hu <jian.hu@amlogic.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260421-clkmsr_a1_t7-v3-4-efc00b0f9e6b@amlogic.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-07-03 11:49:09 +02:00
Jian Hu
dd3d432724 arm64: dts: meson: a1: Add clk measure support
Add the clock measure device to the A1 SoC family.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
Link: https://patch.msgid.link/20260421-clkmsr_a1_t7-v3-3-efc00b0f9e6b@amlogic.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-07-03 11:49:09 +02:00
Linus Torvalds
8a500fd093 TTY / Serial driver update for 7.2-rc1
Here is the big set of TTY and Serial driver updates for 7.2-rc1.
 Overall we end up removing more code than added, due to an obsolete
 synclink_gt driver being removed from the tree, always a nice thing to
 see happen.
 
 Other than that driver removal, major things included in here are:
   - max310x serial driver updates and fixes
   - 8250 driver updates and rework in places to make it more "modern"
   - dts file updates
   - serial driver core tweaks and updates
   - vt code cleanups
   - vc_screen crash fixes
   - other minor driver updates and cleanups
 
 All of these have been in linux-next for well over a week with no
 reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCajk2xQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ymyewCeKSdE2vNK6LQz9hdev9qBh/J0n7oAn091vfYP
 i9C0vxEB+sS9vMsRAro5
 =14Tn
 -----END PGP SIGNATURE-----

Merge tag 'tty-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty / serial driver updates from Greg KH:
 "Here is the big set of TTY and Serial driver updates for 7.2-rc1.

  Overall we end up removing more code than added, due to an obsolete
  synclink_gt driver being removed from the tree, always a nice thing to
  see happen.

  Other than that driver removal, major things included in here are:

   - max310x serial driver updates and fixes

   - 8250 driver updates and rework in places to make it more "modern"

   - dts file updates

   - serial driver core tweaks and updates

   - vt code cleanups

   - vc_screen crash fixes

   - other minor driver updates and cleanups

  All of these have been in linux-next for well over a week with no
  reported issues"

* tag 'tty-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (49 commits)
  serial: 8250_pci: Don't specify conflicting values to pci_device_id members
  vc_screen: fix null-ptr-deref in vcs_notifier() during concurrent vcs_write
  serial: qcom_geni: Fix RX DMA stall when SE_DMA_RX_LEN_IN is zero
  vt: merge ucs_is_zero_width()/ucs_is_double_width() into ucs_get_width()
  serial: 8250: fix possible ISR soft lockup
  dt-bindings: serial: rs485: remove deprecated .txt binding stub
  serial: qcom-geni: trace: Add tracepoint support for Qualcomm GENI serial
  tty: serial: Use named initializers for arrays of i2c_device_data
  serial: 8250_dw: remove clock-notifier infrastructure
  serial: 8250_dw: unregister 8250 port if clk_notifier_register() fails
  amba/serial: amba-pl011: Bring back zx29 UART support
  serial: 8250: Add support for console flow control
  serial: 8250: Check LSR timeout on console flow control
  serial: 8250: Set cons_flow on port registration
  tty: serial: 8250: protect against NULL uart->port.dev in register
  arm64: dts: add support for A9 based Amlogic BY401
  dt-bindings: arm: amlogic: add A311Y3 support
  serial: max310x: fix compile errors if CONFIG_SPI_MASTER is disabled
  serial: qcom-geni: Avoid probing debug console UART without console support
  serial: max310x: add comments for PLL limits
  ...
2026-06-22 11:51:49 -07:00
Ronald Claveau
eec0722a5c arm64: dts: amlogic: t7: Add i2c pinctrl node
Add the T7 pinctrl used by the Khadas VIM4 for MCU communication.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Link: https://patch.msgid.link/20260516-add-mcu-fan-khadas-vim4-v6-6-cccc9b61f465@aliel.fr
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:46 +02:00
Ronald Claveau
61ba02ca47 arm64: dts: amlogic: t7: khadas-vim4: add PWM-driven status LED
The VIM4 board exposes a status LED wired to the PWM_AO_C_D output.
Enable the pwm_ao_cd controller with its pinmux, and declare a
pwm-leds node with a heartbeat trigger.

Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Link: https://patch.msgid.link/20260513-add-kvim4-sysled-v2-3-3ec9779e8875@aliel.fr
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:46 +02:00
Ronald Claveau
a63d58bd2d arm64: dts: amlogic: t7: khadas-vim4: reorder root node
Move the xtal-clk node to restore alphabetical ordering.

Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260513-add-kvim4-sysled-v2-2-3ec9779e8875@aliel.fr
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:46 +02:00
Ronald Claveau
caaf6ccaec arm64: dts: amlogic: t7: Fix missing required reset property
CHECK_DTBS shows missing reset required property in T7 DTBS.
A new CHECK_DTBS with this patch does not show this anymore.

Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Link: https://patch.msgid.link/20260331-fix-aml-t7-null-reset-v1-2-eb95b625234c@aliel.fr
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:46 +02:00
Ronald Claveau
003080cf2c arm64: dts: amlogic: t7: khadas-vim4: Add MMC nodes
Enable and configure the three MMC controllers for the Khadas VIM4 board:
- sd_emmc_a: SDIO interface for the BCM43752 Wi-Fi module
- sd_emmc_b: SD card slot
- sd_emmc_c: eMMC storage

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Link: https://patch.msgid.link/20260326-add-emmc-t7-vim4-v5-9-d3f182b48e9d@aliel.fr
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:46 +02:00
Ronald Claveau
4d2663f85f arm64: dts: amlogic: t7: khadas-vim4: Add SDIO power sequence and WiFi clock
Add the SDIO power sequence node using mmc-pwrseq-simple and a
32.768kHz PWM-based clock required by the Wi-Fi module.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Link: https://patch.msgid.link/20260326-add-emmc-t7-vim4-v5-7-d3f182b48e9d@aliel.fr
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:45 +02:00
Ronald Claveau
97f08cef69 arm64: dts: amlogic: t7: Add PWM controller nodes
Add device tree nodes for the seven PWM controllers available
on the Amlogic T7 SoC, using amlogic,meson-s4-pwm as fallback compatible.
All nodes are disabled by default and should be
enabled in the board-specific DTS file.

Co-developed-by: Nick Xie <nick@khadas.com>
Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Link: https://patch.msgid.link/20260326-add-emmc-t7-vim4-v5-5-d3f182b48e9d@aliel.fr
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:45 +02:00
Ronald Claveau
bd3454d508 arm64: dts: amlogic: t7: Add MMC controller nodes
Add device tree nodes for the three MMC controllers available
on the Amlogic T7 SoC, using amlogic,meson-axg-mmc as fallback compatible.
All nodes are disabled by default and should be
enabled in the board-specific DTS file.

Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260326-add-emmc-t7-vim4-v5-3-d3f182b48e9d@aliel.fr
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:45 +02:00
Jian Hu
68de99550e arm64: dts: amlogic: t7: Add clock controller nodes
Add the required clock controller nodes for Amlogic T7 SoC family:
- SCMI clock controller
- PLL clock controller
- Peripheral clock controller

Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Signed-off-by: Jian Hu <jian.hu@amlogic.com>
Link: https://patch.msgid.link/20260326092645.1053261-4-jian.hu@amlogic.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:45 +02:00
Nick Xie
217a751eec arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: use rc-khadas keymap
The Khadas VIM1S board has an onboard IR receiver.
Configure the default keymap to "rc-khadas" to support the official
Khadas IR remote control.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260327093016.722095-4-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:45 +02:00
Nick Xie
2e63b271fb arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable HYM8563 RTC
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.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260327093016.722095-3-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:45 +02:00
Nick Xie
42379e7ee9 arm64: dts: amlogic: meson-s4: add VRTC node
Add the Virtual RTC (VRTC) controller node to the Meson S4 SoC dtsi.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260327093016.722095-2-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:45 +02:00
Nick Xie
def2d23796 arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: add Function key support
Enable the SARADC controller and add the adc-keys node to support
the Function key found on the Khadas VIM1S board.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Nick Xie <nick@khadas.com>
Link: https://patch.msgid.link/20260325070618.81955-5-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:45 +02:00
Nick Xie
4badf8d60d arm64: dts: amlogic: meson-s4: add internal SARADC controller
Add the SARADC (Successive Approximation Register ADC) controller
node to the Meson S4 SoC dtsi.

It uses the S4-specific compatible string with a fallback to the
G12A generation, as there are no known hardware differences.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Nick Xie <nick@khadas.com>
Link: https://patch.msgid.link/20260325070618.81955-4-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:45 +02:00
Ronald Claveau
8c45bf9ae4 arm64: dts: amlogic: t7: khadas-vim4: Add power regulators
Add voltage regulator nodes describing the VIM4 power tree,
required by peripheral nodes such as the SD card controller.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Link: https://patch.msgid.link/20260326-add-emmc-t7-vim4-v5-6-d3f182b48e9d@aliel.fr
[narmstrong: squashed "Remove invalid property fix" from Ronald]
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-06-02 09:49:13 +02:00
Xianwei Zhao
ab5eadfea1 arm64: dts: add support for A9 based Amlogic BY401
Add basic support for the A9 based Amlogic BY401 board, which describes
the following components: CPU, GIC, IRQ, Timer and UART.
These are capable of booting up into the serial console.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
Link: https://patch.msgid.link/20260423-a9-baisc-dts-v4-2-c26b480a068c@amlogic.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-22 11:45:22 +02:00
Ronald Claveau
2a2a7b9701 arm64: dts: amlogic: t7: Add PWM pinctrl nodes
These pinctrl nodes are required by the PWM drivers to configure
pin muxing at runtime.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Link: https://patch.msgid.link/20260326-add-emmc-t7-vim4-v5-4-d3f182b48e9d@aliel.fr
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-05-13 10:28:08 +02:00
Ronald Claveau
3535303d5d arm64: dts: amlogic: t7: Add eMMC, SD card and SDIO pinctrl nodes
These pinctrl nodes are required by the eMMC, SD card and SDIO drivers
to configure pin muxing at runtime.

- eMMC: control, 4-bit/8-bit data, data strobe and clock gate pins
- SD card: data, clock, command and clock gate pins
- SDIO: data, clock, command and clock gate pins

Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260326-add-emmc-t7-vim4-v5-1-d3f182b48e9d@aliel.fr
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-04-21 15:55:20 +02:00
Nick Xie
cb00d65db2 arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: add POWER key support
Add the gpio-keys-polled node to support the Power button found on the
Khadas VIM1S board. The button is connected to the GPIOD_8 pin.

Use polled mode instead of gpio-keys because the GPIO interrupt
controller support for Meson S4 SoC is not yet available upstream.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260228063750.701887-5-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-04-21 15:55:20 +02:00
Nick Xie
b6a8c516b5 arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: add PWM LED support
The Khadas VIM1S board features a white LED connected to the PWM_G
controller (PWM channel 0).

Enable the PWM_G controller and add the pwm-leds node to support
using this LED as a heartbeat indicator.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260228063750.701887-4-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-04-21 15:55:20 +02:00
Nick Xie
75ed598cd6 arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable bluetooth
The Khadas VIM1S board uses the Ampak AP6256 Wi-Fi/Bluetooth module.
The Bluetooth controller is connected via UART_A and requires the
external 32k clock (LPO).

Enable the UART_A node and add the bluetooth child node to support it.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260228063750.701887-3-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-04-21 15:55:20 +02:00
Nick Xie
a895042339 arm64: dts: amlogic: meson-s4: add UART_A node
Add the UART_A node and its related pinctrl definitions to the
Meson S4 SoC dtsi.

The pinctrl groups are split into basic tx/rx and flow control (cts/rts)
to allow board-level flexibility.

This interface is typically used for Bluetooth communication on
boards like the Khadas VIM1S.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260228063750.701887-2-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-04-21 15:55:20 +02:00
Jun Yan
b5b481063f arm64: dts: amlogic: meson-gxl-s905d-phicomm-n1: add bluetooth node
The Phicomm N1 uses a CY43455 (BCM43438) module with its Bluetooth
interface connected to uart_A.

Add the required device tree node to enable proper functionality.

Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260213073810.552341-1-jerrysteve1101@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-04-21 15:55:20 +02:00
Jun Yan
174a0ef3b3 arm64: dts: meson-gxl-p230: fix ethernet PHY interrupt number
Correct the interrupt number assigned to the Realtek PHY in the p230

following the same logic as commit 3106507e10 ("ARM64: dts: meson-gxm:
fix q200 interrupt number"),as reported in [PATCH 0/2] Ethernet PHY
interrupt improvements [1].

[1] https://lore.kernel.org/all/20171202214037.17017-1-martin.blumenstingl@googlemail.com/

Fixes: b94d22d94a ("ARM64: dts: meson-gx: add external PHY interrupt on some platforms")
Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260330145111.115318-1-jerrysteve1101@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-04-21 15:46:29 +02:00
Anand Moon
918273be08 arm64: dts: amlogic: meson-axg: Add missing cache information to cpu0
Add missing L1 data and instruction cache parameters to the CPU node 0
for the Cortex-A53 caches on the Meson AXG SoC.

Fixes: 3b6ad2a433 ("arm64: dts: amlogic: Add cache information to the Amlogic AXG SoCS")
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Link: https://patch.msgid.link/20260219103548.18392-1-linux.amoon@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-04-21 15:46:22 +02:00
Nick Xie
28e4a49a28 arm64: dts: amlogic: t7: khadas-vim4: fix board model name
Update the model property to "Khadas VIM4" to match the official
product branding and maintain consistency with other Khadas boards
(e.g., VIM1, VIM2, VIM3) in the kernel tree.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260306030756.2421841-1-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-04-21 15:46:22 +02:00
Ronald Claveau
232eb5dc61 arm64: dts: amlogic: Fix GIC register ranges for Amlogic T7
This patch aims to fix the GIC register ranges for Amlogic T7 SoC family.

- Context
Kernel log shows a warning about GIC
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set

Using cat /proc/interrupts command shows GIC as GIC-0

Adding some peripherals sometimes causes hangs on interrupts.

- According to the GIC-400 ARM doc, the memory map is like:
0x1000-0x1FFF Distributor
0x2000-0x3FFF CPU interfaces
0x4000-0x5FFF Virtual interface control block
0x6000-0x7FFF Virtual CPU interfaces

- Identify GIC model from distributor register

Offset | Name | Type | Reset
0x008 | GICD_IIDR | RO | 0x0200143B

kvim4# md.l 0xFFF01008 1
fff01008: 0200143b

- Identify CPU interface from CPU interface register

Offset | Name | Type | Reset
0x00FC | GICC_IIDR | RO | 0x0202143B

kvim4# md.l 0xFFF020FC 1
fff020fc: 0202143b

- Virtual interface control register check

Offset | Name | Type | Reset
0x004 | GICH_VTR | RO | 0x90000003

kvim4# md.l 0xFFF04004 1
fff04004: 90000003

- Virtual CPU interfaces check

Offset | Name | Type | Reset
0x00FC | GICV_IIDR | RO | 0x0202143B

kvim4# md.l 0xFFF060FC 1
fff060fc: 0202143b

- After this patch there is no warning anymore.
GICv2 is correctly identified.

[    0.000000] GIC: Using split EOI/Deactivate mode

Using cat /proc/interrupts command shows GIC as GICv2

Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260305-fix-amlt7-gic-dts-v1-1-5944415c74bf@aliel.fr
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-04-21 15:46:22 +02:00
Nick Xie
124d5e138a arm64: dts: amlogic: t7: khadas-vim4: fix memory layout for 8GB RAM
The Khadas VIM4 features 8GB of LPDDR4X RAM. The previous memory node
mapped a single incorrect region. This caused the kernel to map MMIO
and secure firmware (ATF/TrustZone) memory holes as standard RAM,
leading to an Asynchronous SError Interrupt during early boot
(paging_init) when the kernel attempted to clear those pages.

Fix this by splitting the 8GB memory layout into three separate
regions to properly avoid the memory holes (e.g., 0xe0000000 -
0xffffffff):
- 3.5GB @ 0x000000000
- 3.5GB @ 0x100000000
- 1.0GB @ 0x200000000

Signed-off-by: Nick Xie <nick@khadas.com>
Suggested-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
Link: https://patch.msgid.link/20260319023446.3422695-1-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-04-21 15:46:22 +02:00
Geert Uytterhoeven
5ecee47dc9 arm64: dts: amlogic: s6: Drop CPU masks from GICv3 PPI interrupts
Unlike older GIC variants, the GICv3 DT bindings do not support
specifying a CPU mask in PPI interrupt specifiers.  Drop the masks.
While at it, replace the magic number for IRQ_TYPE_LEVEL_HIGH by its
symbolic definition.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/f9c6eddebebcd2e128edd2dbc51706e23589f9e8.1772643434.git.geert+renesas@glider.be
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-04-21 15:46:22 +02:00
Nick Xie
854583f999 arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable SDIO interface
Enable the SDIO controller interface connected to the on-board
AP6256 WiFi/BT module.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260121014725.122722-1-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-01-21 17:44:08 +01:00
Ricardo Pardini
2afef25cc4 arm64: dts: amlogic: add the type-c controller on Radxa Zero 2
The Radxa Zero2 has an FUSB302 controller on i2c3 at address 0x22 and
INT# wired to GPIOA-13; include a minimal connector.

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260115-arm64-dts-amlogic-radxa-zero2-additions-v2-1-948bb0479a45@pardini.net
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-01-20 09:31:03 +01:00
Eric Neulight
436418ef5b arm64: dts: amlogic: meson-sm1-odroid: Eliminate Odroid HC4 power glitches during boot.
Fix issue with Odroid HC4 (and all meson-sm1-odroid) DTS that causes
regulator power to momentarily glitch OFF-ON during boot.  Add
regulator-boot-on to all regulator-fixed and regulator-gpio entries
that (1) define a gpio AND (2) define regulator-always-on.

U-boot powers on devices necessary for boot then hands off the DTB to
the kernel.  During probe, linux drivers/regulator/fixed.c and
gpio-regulator.c both first set the regulator control gpio (that U-boot
already turned ON) to default OFF before then setting it to the defined
(ON) state. This glitches the power to the affected devices, unless
regulator-boot-on is specified with it.  In fact, U-boot has the same
behavior.  So, during reboot, a power glitch can actually happen twice:
once when U-boot reads the DTB and probes the gpio and again when the
kernel reads the DTB and probes the gpio.

Problem this fixes: On the Odroid HC4, power to the SATA ports glitches
during boot and causes some HDDs to do emergency head retract, which
should be avoided.  On the HC4, power glitches to the SD card, USB,
SATA, and HDMI interfaces during boot.  These are all boot devices.
A power glitch can potentially cause a problem for any sensitive devices
during boot.

NOTE: This is not limited to just the HC4, likely an issue with ALL DTS
with regulator-fixed or regulator-gpio entries that (1) define a gpio
AND (2) define regulator-always-on.  All such entries should also
include regulator-boot-on in order to avoid potential power glitches.
At worst, adding regulator-boot-on in such cases is harmless because of
regulator-always-on, and, at best, it eliminates detrimental power
glitches during boot.  So, this is best-practice.

Fixes: 164147f094 ("arm64: dts: meson-sm1-odroid-hc4: add regulators controlled by GPIOH_8")
Fixes: 45d736ab17 ("arm64: dts: meson-sm1-odroid: add 5v regulator gpio")
Fixes: 1f80a5cf74 ("arm64: dts: meson-sm1-odroid: add missing enable gpio and supply for tf_io regulator")
Fixes: 88d537bc92 ("arm64: dts: meson: convert meson-sm1-odroid-c4 to dtsi")

Signed-off-by: Eric Neulight <Eric.Neulight@linuxdev.slmail.me>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Acked-by: Viacheslav Bocharov <v@baodeep.com>
Tested-by: Ricardo Pardini <ricardo@pardini.net> # on Odroid-HC4 5V HDD
Link: https://patch.msgid.link/20260116-odroid-hc4-dts-v1-1-459b601cd5cf@linuxdev.slmail.me
[narmstrong: fixed subject prefix]
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-01-20 09:28:41 +01:00
Nick Xie
1099b3b6ab arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: enable eMMC storage
Enable the on-board eMMC storage for Khadas VIM1S.

The VIM1S features a 16GB eMMC 5.1 module. This patch adds the
necessary regulators and the eMMC controller node.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260116023611.2033078-1-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-01-20 09:28:26 +01:00
Nick Xie
44e3f867fd arm64: dts: meson-s4-s905y4-khadas-vim1s: add initial device tree
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>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260115030015.1334517-4-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2026-01-15 14:00:43 +01:00