Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2014 |
| 4 | * Heiko Schocher, DENX Software Engineering, hs@denx.de. |
| 5 | * |
| 6 | * Based on: |
| 7 | * Copyright (C) 2012 Freescale Semiconductor, Inc. |
| 8 | * |
| 9 | * Author: Fabio Estevam <fabio.estevam@freescale.com> |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 10 | */ |
| 11 | |
| 12 | #include <asm/arch/clock.h> |
| 13 | #include <asm/arch/imx-regs.h> |
| 14 | #include <asm/arch/iomux.h> |
| 15 | #include <asm/arch/mx6-pins.h> |
Masahiro Yamada | 1221ce4 | 2016-09-21 11:28:55 +0900 | [diff] [blame] | 16 | #include <linux/errno.h> |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 17 | #include <asm/gpio.h> |
Stefano Babic | 552a848 | 2017-06-29 10:16:06 +0200 | [diff] [blame] | 18 | #include <asm/mach-imx/iomux-v3.h> |
| 19 | #include <asm/mach-imx/boot_mode.h> |
| 20 | #include <asm/mach-imx/mxc_i2c.h> |
| 21 | #include <asm/mach-imx/video.h> |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 22 | #include <mmc.h> |
Yangbo Lu | e37ac71 | 2019-06-21 11:42:28 +0800 | [diff] [blame] | 23 | #include <fsl_esdhc_imx.h> |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 24 | #include <miiphy.h> |
| 25 | #include <netdev.h> |
| 26 | #include <asm/arch/mxc_hdmi.h> |
| 27 | #include <asm/arch/crm_regs.h> |
| 28 | #include <linux/fb.h> |
| 29 | #include <ipu_pixfmt.h> |
Diego Dorta | 7594c51 | 2017-09-22 12:12:18 -0300 | [diff] [blame] | 30 | #include <input.h> |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 31 | #include <asm/io.h> |
| 32 | #include <asm/arch/sys_proto.h> |
| 33 | #include <pwm.h> |
| 34 | |
| 35 | DECLARE_GLOBAL_DATA_PTR; |
| 36 | |
| 37 | #define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ |
| 38 | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \ |
| 39 | PAD_CTL_SRE_FAST | PAD_CTL_HYS) |
| 40 | |
| 41 | #define USDHC_PAD_CTRL (PAD_CTL_PUS_47K_UP | \ |
| 42 | PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \ |
| 43 | PAD_CTL_SRE_FAST | PAD_CTL_HYS) |
| 44 | |
| 45 | #define ENET_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ |
| 46 | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS) |
| 47 | |
| 48 | #define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \ |
| 49 | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) |
| 50 | |
| 51 | #define I2C_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ |
| 52 | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ |
| 53 | PAD_CTL_ODE | PAD_CTL_SRE_FAST) |
| 54 | |
| 55 | #define PC MUX_PAD_CTRL(I2C_PAD_CTRL) |
| 56 | |
| 57 | #define DISP_PAD_CTRL (0x10) |
| 58 | |
| 59 | #define ECSPI4_CS1 IMX_GPIO_NR(5, 2) |
| 60 | |
Heiko Schocher | a7e2dc9 | 2019-12-01 11:23:04 +0100 | [diff] [blame] | 61 | #if ((CONFIG_SYS_BOARD_VERSION == 2) || (CONFIG_SYS_BOARD_VERSION == 3)) |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 62 | #include "./aristainetos-v2.c" |
| 63 | #endif |
| 64 | |
| 65 | |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 66 | struct i2c_pads_info i2c_pad_info1 = { |
| 67 | .scl = { |
| 68 | .i2c_mode = MX6_PAD_CSI0_DAT9__I2C1_SCL | PC, |
| 69 | .gpio_mode = MX6_PAD_CSI0_DAT9__GPIO5_IO27 | PC, |
| 70 | .gp = IMX_GPIO_NR(5, 27) |
| 71 | }, |
| 72 | .sda = { |
| 73 | .i2c_mode = MX6_PAD_CSI0_DAT8__I2C1_SDA | PC, |
| 74 | .gpio_mode = MX6_PAD_CSI0_DAT8__GPIO5_IO26 | PC, |
| 75 | .gp = IMX_GPIO_NR(5, 26) |
| 76 | } |
| 77 | }; |
| 78 | |
| 79 | struct i2c_pads_info i2c_pad_info2 = { |
| 80 | .scl = { |
| 81 | .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL | PC, |
| 82 | .gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12 | PC, |
| 83 | .gp = IMX_GPIO_NR(4, 12) |
| 84 | }, |
| 85 | .sda = { |
| 86 | .i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA | PC, |
| 87 | .gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13 | PC, |
| 88 | .gp = IMX_GPIO_NR(4, 13) |
| 89 | } |
| 90 | }; |
| 91 | |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 92 | iomux_v3_cfg_t const usdhc1_pads[] = { |
| 93 | MX6_PAD_SD1_CLK__SD1_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), |
| 94 | MX6_PAD_SD1_CMD__SD1_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), |
| 95 | MX6_PAD_SD1_DAT0__SD1_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), |
| 96 | MX6_PAD_SD1_DAT1__SD1_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), |
| 97 | MX6_PAD_SD1_DAT2__SD1_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), |
| 98 | MX6_PAD_SD1_DAT3__SD1_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), |
| 99 | }; |
| 100 | |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 101 | int dram_init(void) |
Heiko Schocher | 2f6bb0a | 2014-10-30 13:14:03 +0100 | [diff] [blame] | 102 | { |
Fabio Estevam | 84c5168 | 2016-07-23 13:23:39 -0300 | [diff] [blame] | 103 | gd->ram_size = imx_ddr_size(); |
Heiko Schocher | 2f6bb0a | 2014-10-30 13:14:03 +0100 | [diff] [blame] | 104 | |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 105 | return 0; |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 106 | } |
| 107 | |
Yangbo Lu | e37ac71 | 2019-06-21 11:42:28 +0800 | [diff] [blame] | 108 | #ifdef CONFIG_FSL_ESDHC_IMX |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 109 | struct fsl_esdhc_cfg usdhc_cfg[2] = { |
| 110 | {USDHC1_BASE_ADDR}, |
| 111 | {USDHC2_BASE_ADDR}, |
| 112 | }; |
| 113 | |
| 114 | int board_mmc_getcd(struct mmc *mmc) |
| 115 | { |
| 116 | return 1; |
| 117 | } |
| 118 | |
| 119 | int board_mmc_init(bd_t *bis) |
| 120 | { |
| 121 | usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 122 | imx_iomux_v3_setup_multiple_pads(usdhc1_pads, ARRAY_SIZE(usdhc1_pads)); |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 123 | #if (CONFIG_SYS_BOARD_VERSION == 2) |
| 124 | /* |
| 125 | * usdhc2 has a levelshifter on the carrier board Rev. DV1, |
| 126 | * that will automatically detect the driving direction. |
| 127 | * During initialisation this isn't working correctly, |
| 128 | * which causes DAT3 to be driven low towards the SD-card. |
| 129 | * This causes a SD-card enetring the SPI-Mode |
| 130 | * and therefore getting inaccessible until next power cycle. |
| 131 | * As workaround we drive the DAT3 line as GPIO and set it high. |
| 132 | * This makes usdhc2 unusable in u-boot, but works for the |
| 133 | * initialisation in Linux |
| 134 | */ |
| 135 | imx_iomux_v3_setup_pad(MX6_PAD_SD2_DAT3__GPIO1_IO12 | |
| 136 | MUX_PAD_CTRL(NO_PAD_CTRL)); |
| 137 | gpio_direction_output(IMX_GPIO_NR(1, 12) , 1); |
| 138 | #endif |
| 139 | return fsl_esdhc_initialize(bis, &usdhc_cfg[0]); |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 140 | } |
| 141 | #endif |
| 142 | |
| 143 | /* |
| 144 | * Do not overwrite the console |
| 145 | * Use always serial for U-Boot console |
| 146 | */ |
| 147 | int overwrite_console(void) |
| 148 | { |
| 149 | return 1; |
| 150 | } |
| 151 | |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 152 | struct display_info_t const displays[] = { |
| 153 | { |
| 154 | .bus = -1, |
| 155 | .addr = 0, |
| 156 | .pixfmt = IPU_PIX_FMT_RGB24, |
| 157 | .detect = NULL, |
| 158 | .enable = enable_lvds, |
| 159 | .mode = { |
| 160 | .name = "lb07wv8", |
| 161 | .refresh = 60, |
| 162 | .xres = 800, |
| 163 | .yres = 480, |
Heiko Schocher | d0d005b | 2015-08-11 08:09:44 +0200 | [diff] [blame] | 164 | .pixclock = 30066, |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 165 | .left_margin = 88, |
| 166 | .right_margin = 88, |
Heiko Schocher | d0d005b | 2015-08-11 08:09:44 +0200 | [diff] [blame] | 167 | .upper_margin = 20, |
| 168 | .lower_margin = 20, |
Heiko Schocher | b4b39a7 | 2015-01-20 10:06:18 +0100 | [diff] [blame] | 169 | .hsync_len = 80, |
Heiko Schocher | d0d005b | 2015-08-11 08:09:44 +0200 | [diff] [blame] | 170 | .vsync_len = 5, |
| 171 | .sync = FB_SYNC_EXT, |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 172 | .vmode = FB_VMODE_NONINTERLACED |
| 173 | } |
| 174 | } |
Heiko Schocher | 9627084 | 2015-08-24 11:36:40 +0200 | [diff] [blame] | 175 | #if ((CONFIG_SYS_BOARD_VERSION == 2) || (CONFIG_SYS_BOARD_VERSION == 3)) |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 176 | , { |
| 177 | .bus = -1, |
| 178 | .addr = 0, |
| 179 | .pixfmt = IPU_PIX_FMT_RGB24, |
| 180 | .detect = NULL, |
| 181 | .enable = enable_spi_display, |
| 182 | .mode = { |
| 183 | .name = "lg4573", |
Heiko Schocher | d0d005b | 2015-08-11 08:09:44 +0200 | [diff] [blame] | 184 | .refresh = 57, |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 185 | .xres = 480, |
| 186 | .yres = 800, |
| 187 | .pixclock = 37037, |
| 188 | .left_margin = 59, |
| 189 | .right_margin = 10, |
| 190 | .upper_margin = 15, |
| 191 | .lower_margin = 15, |
| 192 | .hsync_len = 10, |
| 193 | .vsync_len = 15, |
| 194 | .sync = FB_SYNC_EXT | FB_SYNC_HOR_HIGH_ACT | |
| 195 | FB_SYNC_VERT_HIGH_ACT, |
| 196 | .vmode = FB_VMODE_NONINTERLACED |
| 197 | } |
| 198 | } |
| 199 | #endif |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 200 | }; |
| 201 | size_t display_count = ARRAY_SIZE(displays); |
| 202 | |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 203 | /* no console on this board */ |
| 204 | int board_cfb_skip(void) |
| 205 | { |
| 206 | return 1; |
| 207 | } |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 208 | |
| 209 | iomux_v3_cfg_t nfc_pads[] = { |
| 210 | MX6_PAD_NANDF_CLE__NAND_CLE | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 211 | MX6_PAD_NANDF_ALE__NAND_ALE | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 212 | MX6_PAD_NANDF_WP_B__NAND_WP_B | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 213 | MX6_PAD_NANDF_RB0__NAND_READY_B | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 214 | MX6_PAD_NANDF_CS0__NAND_CE0_B | MUX_PAD_CTRL(NO_PAD_CTRL), |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 215 | MX6_PAD_SD4_CMD__NAND_RE_B | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 216 | MX6_PAD_SD4_CLK__NAND_WE_B | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 217 | MX6_PAD_NANDF_D0__NAND_DATA00 | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 218 | MX6_PAD_NANDF_D1__NAND_DATA01 | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 219 | MX6_PAD_NANDF_D2__NAND_DATA02 | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 220 | MX6_PAD_NANDF_D3__NAND_DATA03 | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 221 | MX6_PAD_NANDF_D4__NAND_DATA04 | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 222 | MX6_PAD_NANDF_D5__NAND_DATA05 | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 223 | MX6_PAD_NANDF_D6__NAND_DATA06 | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 224 | MX6_PAD_NANDF_D7__NAND_DATA07 | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 225 | MX6_PAD_SD4_DAT0__NAND_DQS | MUX_PAD_CTRL(NO_PAD_CTRL), |
| 226 | }; |
| 227 | |
| 228 | static void setup_gpmi_nand(void) |
| 229 | { |
| 230 | struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; |
| 231 | |
| 232 | /* config gpmi nand iomux */ |
| 233 | imx_iomux_v3_setup_multiple_pads(nfc_pads, |
| 234 | ARRAY_SIZE(nfc_pads)); |
| 235 | |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 236 | /* gate ENFC_CLK_ROOT clock first,before clk source switch */ |
| 237 | clrbits_le32(&mxc_ccm->CCGR2, MXC_CCM_CCGR2_IOMUX_IPT_CLK_IO_MASK); |
| 238 | |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 239 | /* config gpmi and bch clock to 100 MHz */ |
| 240 | clrsetbits_le32(&mxc_ccm->cs2cdr, |
| 241 | MXC_CCM_CS2CDR_ENFC_CLK_PODF_MASK | |
| 242 | MXC_CCM_CS2CDR_ENFC_CLK_PRED_MASK | |
| 243 | MXC_CCM_CS2CDR_ENFC_CLK_SEL_MASK, |
| 244 | MXC_CCM_CS2CDR_ENFC_CLK_PODF(0) | |
| 245 | MXC_CCM_CS2CDR_ENFC_CLK_PRED(3) | |
| 246 | MXC_CCM_CS2CDR_ENFC_CLK_SEL(3)); |
| 247 | |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 248 | /* enable ENFC_CLK_ROOT clock */ |
| 249 | setbits_le32(&mxc_ccm->CCGR2, MXC_CCM_CCGR2_IOMUX_IPT_CLK_IO_MASK); |
| 250 | |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 251 | /* enable gpmi and bch clock gating */ |
| 252 | setbits_le32(&mxc_ccm->CCGR4, |
| 253 | MXC_CCM_CCGR4_RAWNAND_U_BCH_INPUT_APB_MASK | |
| 254 | MXC_CCM_CCGR4_RAWNAND_U_GPMI_BCH_INPUT_BCH_MASK | |
| 255 | MXC_CCM_CCGR4_RAWNAND_U_GPMI_BCH_INPUT_GPMI_IO_MASK | |
| 256 | MXC_CCM_CCGR4_RAWNAND_U_GPMI_INPUT_APB_MASK | |
| 257 | MXC_CCM_CCGR4_PL301_MX6QPER1_BCH_OFFSET); |
| 258 | |
| 259 | /* enable apbh clock gating */ |
| 260 | setbits_le32(&mxc_ccm->CCGR0, MXC_CCM_CCGR0_APBHDMA_MASK); |
| 261 | } |
| 262 | |
| 263 | int board_init(void) |
| 264 | { |
| 265 | struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR; |
| 266 | |
| 267 | /* address of boot parameters */ |
| 268 | gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; |
| 269 | |
| 270 | setup_spi(); |
| 271 | |
| 272 | setup_i2c(0, CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE, |
| 273 | &i2c_pad_info1); |
| 274 | setup_i2c(1, CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE, |
| 275 | &i2c_pad_info2); |
| 276 | setup_i2c(2, CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE, |
| 277 | &i2c_pad_info3); |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 278 | setup_i2c4(); |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 279 | |
| 280 | /* SPI NOR Flash read only */ |
| 281 | gpio_request(CONFIG_GPIO_ENABLE_SPI_FLASH, "ena_spi_nor"); |
| 282 | gpio_direction_output(CONFIG_GPIO_ENABLE_SPI_FLASH, 0); |
| 283 | gpio_free(CONFIG_GPIO_ENABLE_SPI_FLASH); |
| 284 | |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 285 | setup_board_gpio(); |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 286 | setup_gpmi_nand(); |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 287 | setup_board_spi(); |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 288 | |
| 289 | /* GPIO_1 for USB_OTG_ID */ |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 290 | clrsetbits_le32(&iomux->gpr[1], IOMUXC_GPR1_USB_OTG_ID_SEL_MASK, 0); |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 291 | imx_iomux_v3_setup_multiple_pads(misc_pads, ARRAY_SIZE(misc_pads)); |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 292 | return 0; |
| 293 | } |
| 294 | |
| 295 | int checkboard(void) |
| 296 | { |
Heiko Schocher | 7254d92 | 2015-05-18 13:32:31 +0200 | [diff] [blame] | 297 | printf("Board: %s\n", CONFIG_BOARDNAME); |
Heiko Schocher | e379c03 | 2014-07-18 06:07:22 +0200 | [diff] [blame] | 298 | return 0; |
| 299 | } |
| 300 | |
| 301 | #ifdef CONFIG_USB_EHCI_MX6 |
| 302 | int board_ehci_hcd_init(int port) |
| 303 | { |
| 304 | int ret; |
| 305 | |
| 306 | ret = gpio_request(ARISTAINETOS_USB_H1_PWR, "usb-h1-pwr"); |
| 307 | if (!ret) |
| 308 | gpio_direction_output(ARISTAINETOS_USB_H1_PWR, 1); |
| 309 | ret = gpio_request(ARISTAINETOS_USB_OTG_PWR, "usb-OTG-pwr"); |
| 310 | if (!ret) |
| 311 | gpio_direction_output(ARISTAINETOS_USB_OTG_PWR, 1); |
| 312 | return 0; |
| 313 | } |
| 314 | |
| 315 | int board_ehci_power(int port, int on) |
| 316 | { |
| 317 | if (port) |
| 318 | gpio_set_value(ARISTAINETOS_USB_OTG_PWR, on); |
| 319 | else |
| 320 | gpio_set_value(ARISTAINETOS_USB_H1_PWR, on); |
| 321 | return 0; |
| 322 | } |
| 323 | #endif |