Re: [PATCH 3/3] arm64: dts: socfpga: agilex5: add support for Terasic DE25-Nano
From: James Clark
Date: Wed Nov 25 2026 - 19:51:31 EST
Hi Alexandra,
Thanks for posting this. I have a DE25-Nano here and have been running
a mainline kernel on it with a board file based on Altera's.
On Wed, Nov 18, 2026 at 08:07:15PM +0100, Alexandra Østermark wrote:
> + leds {
> + compatible = "gpio-leds";
> +
> + led-0 {
> + label = "hps_led0";
> + gpios = <&portb 17 GPIO_ACTIVE_LOW>;
My testing found GPIO_ACTIVE_LOW is wrong here. Altera's and Terasic's
device trees have the same mistake. You can test with
/sys/class/leds/hps_led0/brightness . With GPIO_ACTIVE_LOW, 0 turns the
LED on and 1 turns it off. With GPIO_ACTIVE_HIGH, 1 turns it on and 0
turns it off, as expected.
> +&gpio1 {
> + status = "okay";
> +};
I suggest also enabling i2c1, as Altera's file does:
&i2c1 {
status = "okay";
};
Unlike the other HPS I2C controllers, which only reach pins through the
FPGA, i2c1 is on the HPS's own pins (HPS IO 36/37) and goes to the
onboard LIS2DW12 accelerometer at 0x19, so it doesn't depend on the
FPGA design. I've tested it on my board. With i2c1 the only I2C
controller enabled, it is i2c-0:
# i2cdetect -y -r 0 0x18 0x19 (shows 19)
# i2cget -y 0 0x19 0x0f (WHO_AM_I, reads 0x44)
James