|
| 1 | +/* |
| 2 | + * Copyright (c) 2020 Raspberry Pi (Trading) Ltd. |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: BSD-3-Clause |
| 5 | + */ |
| 6 | + |
| 7 | +// ----------------------------------------------------- |
| 8 | +// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO |
| 9 | +// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES |
| 10 | +// ----------------------------------------------------- |
| 11 | + |
| 12 | +#ifndef _BOARDS_WIZNET_W5100S_EVB_PICO2_H |
| 13 | +#define _BOARDS_WIZNET_W5100S_EVB_PICO2_H |
| 14 | + |
| 15 | +pico_board_cmake_set(PICO_PLATFORM, rp2350) |
| 16 | + |
| 17 | +// For board detection |
| 18 | +#define WIZNET_W5100S_EVB_PICO2 |
| 19 | + |
| 20 | +// --- RP2350 VARIANT --- |
| 21 | +#define PICO_RP2350A 1 |
| 22 | + |
| 23 | +// --- BOARD SPECIFIC --- |
| 24 | +#ifndef W5100S_EVB_PICO2_INTN_PIN |
| 25 | +#define W5100S_EVB_PICO2_INTN_PIN 21 |
| 26 | +#endif |
| 27 | + |
| 28 | +#ifndef W5100S_EVB_PICO2_RSTN_PIN |
| 29 | +#define W5100S_EVB_PICO2_RSTN_PIN 20 |
| 30 | +#endif |
| 31 | + |
| 32 | +#ifndef W5100S_EVB_PICO2_A0_PIN |
| 33 | +#define W5100S_EVB_PICO2_A0_PIN 26 |
| 34 | +#endif |
| 35 | +#ifndef W5100S_EVB_PICO2_A1_PIN |
| 36 | +#define W5100S_EVB_PICO2_A1_PIN 27 |
| 37 | +#endif |
| 38 | +#ifndef W5100S_EVB_PICO2_A2_PIN |
| 39 | +#define W5100S_EVB_PICO2_A2_PIN 28 |
| 40 | +#endif |
| 41 | + |
| 42 | +// --- LED --- |
| 43 | +#ifndef PICO_DEFAULT_LED_PIN |
| 44 | +#define PICO_DEFAULT_LED_PIN 25 |
| 45 | +#endif |
| 46 | + |
| 47 | +// --- UART --- |
| 48 | +#ifndef PICO_DEFAULT_UART |
| 49 | +#define PICO_DEFAULT_UART 0 |
| 50 | +#endif |
| 51 | +#ifndef PICO_DEFAULT_UART_TX_PIN |
| 52 | +#define PICO_DEFAULT_UART_TX_PIN 0 |
| 53 | +#endif |
| 54 | +#ifndef PICO_DEFAULT_UART_RX_PIN |
| 55 | +#define PICO_DEFAULT_UART_RX_PIN 1 |
| 56 | +#endif |
| 57 | + |
| 58 | + |
| 59 | +// --- I2C --- |
| 60 | +#ifndef PICO_DEFAULT_I2C |
| 61 | +#define PICO_DEFAULT_I2C 0 |
| 62 | +#endif |
| 63 | +#ifndef PICO_DEFAULT_I2C_SDA_PIN |
| 64 | +#define PICO_DEFAULT_I2C_SDA_PIN 4 |
| 65 | +#endif |
| 66 | +#ifndef PICO_DEFAULT_I2C_SCL_PIN |
| 67 | +#define PICO_DEFAULT_I2C_SCL_PIN 5 |
| 68 | +#endif |
| 69 | + |
| 70 | +// --- SPI --- |
| 71 | +#ifndef PICO_DEFAULT_SPI |
| 72 | +#define PICO_DEFAULT_SPI 0 |
| 73 | +#endif |
| 74 | +#ifndef PICO_DEFAULT_SPI_SCK_PIN |
| 75 | +#define PICO_DEFAULT_SPI_SCK_PIN 18 |
| 76 | +#endif |
| 77 | +#ifndef PICO_DEFAULT_SPI_TX_PIN |
| 78 | +#define PICO_DEFAULT_SPI_TX_PIN 19 |
| 79 | +#endif |
| 80 | +#ifndef PICO_DEFAULT_SPI_RX_PIN |
| 81 | +#define PICO_DEFAULT_SPI_RX_PIN 16 |
| 82 | +#endif |
| 83 | +#ifndef PICO_DEFAULT_SPI_CSN_PIN |
| 84 | +#define PICO_DEFAULT_SPI_CSN_PIN 17 |
| 85 | +#endif |
| 86 | + |
| 87 | +// --- FLASH --- |
| 88 | + |
| 89 | +#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1 |
| 90 | + |
| 91 | +#ifndef PICO_FLASH_SPI_CLKDIV |
| 92 | +#define PICO_FLASH_SPI_CLKDIV 2 |
| 93 | +#endif |
| 94 | + |
| 95 | +pico_board_cmake_set_default(PICO_FLASH_SIZE_BYTES, (2 * 1024 * 1024)) |
| 96 | +#ifndef PICO_FLASH_SIZE_BYTES |
| 97 | +#define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024) |
| 98 | +#endif |
| 99 | +// Drive high to force power supply into PWM mode (lower ripple on 3V3 at light loads) |
| 100 | +#define PICO_SMPS_MODE_PIN 23 |
| 101 | + |
| 102 | +// The GPIO Pin used to read VBUS to determine if the device is battery powered. |
| 103 | +#ifndef PICO_VBUS_PIN |
| 104 | +#define PICO_VBUS_PIN 24 |
| 105 | +#endif |
| 106 | + |
| 107 | +// The GPIO Pin used to monitor VSYS. Typically you would use this with ADC. |
| 108 | +// There is an example in adc/read_vsys in pico-examples. |
| 109 | +#ifndef PICO_VSYS_PIN |
| 110 | +#define PICO_VSYS_PIN 29 |
| 111 | +#endif |
| 112 | + |
| 113 | +pico_board_cmake_set_default(PICO_RP2350_A2_SUPPORTED, 1) |
| 114 | +#ifndef PICO_RP2350_A2_SUPPORTED |
| 115 | +#define PICO_RP2350_A2_SUPPORTED 1 |
| 116 | +#endif |
| 117 | + |
| 118 | +#endif |
0 commit comments