Commit 435ae981 authored by Alex Bucknall's avatar Alex Bucknall Committed by Benjamin Cabé
Browse files

boards: blues: Updates Cygnet & Swan



Adds missing vref & vbat to cygnet, disables discharge pins.

Signed-off-by: default avatarAlex Bucknall <alex.bucknall@gmail.com>
parent 97324c93
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -40,9 +40,23 @@
		};
	};

	// PH1 can be used to discharge the 3v3 net. Disabled by default.
	zephyr,user {
		dischrg-gpios = <&gpioh 1 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
	};

	supply-3v3 {
		compatible = "regulator-fixed";
		regulator-name = "supply-3v3";
		enable-gpios = <&gpioh 0 GPIO_ACTIVE_HIGH>;
		regulator-boot-on;
	};

	aliases {
		led0 = &user_led;
		sw0 = &user_button;
		volt-sensor0 = &vref;
		volt-sensor1 = &vbat;
	};
};

@@ -136,3 +150,11 @@
		};
	};
};

&vref {
	status = "okay";
};

&vbat {
	status = "okay";
};
+2 −0
Original line number Diff line number Diff line
@@ -15,3 +15,5 @@ CONFIG_GPIO=y
# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

CONFIG_REGULATOR=y
+0 −4
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0

zephyr_library()
zephyr_library_sources(board.c)

boards/blues/swan_r5/board.c

deleted100644 → 0
+0 −25
Original line number Diff line number Diff line
/*
 * Copyright (c) 2022 Blues Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr/drivers/gpio.h>
#include <zephyr/init.h>

static int board_swan_init(void)
{
	const struct gpio_dt_spec dischrg =
		GPIO_DT_SPEC_GET(DT_PATH(zephyr_user), dischrg_gpios);


	if (!gpio_is_ready_dt(&dischrg)) {
		return -ENODEV;
	}

	(void)gpio_pin_configure_dt(&dischrg, GPIO_OUTPUT_INACTIVE);

	return 0;
}

SYS_INIT(board_swan_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
+2 −1
Original line number Diff line number Diff line
@@ -38,9 +38,10 @@
		};
	};


	// PE6 can be used to discharge the 3v3 net. Disabled by default.
	zephyr,user {
		dischrg-gpios = <&gpioe 6 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
		status = "disabled";
	};

	supply-3v3 {