summaryrefslogtreecommitdiff
path: root/supervisor
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-10-15 15:55:21 -0400
committerDan Halbert <halbert@halwitz.org>2019-10-15 15:55:21 -0400
commitbe8136dc6d09e2c3af5c20c881662ebf51a778d8 (patch)
treed365470b40d1877449c929dce43c55a288550437 /supervisor
parentfc19e03128aeeb94a22fdff097e4d0576d768986 (diff)
parent63790f01f833ff197d92f80816f21a61e924bd72 (diff)
Merge remote-tracking branch 'adafruit/master' into bonding1
Diffstat (limited to 'supervisor')
-rw-r--r--supervisor/shared/external_flash/devices.h37
-rw-r--r--supervisor/supervisor.mk78
2 files changed, 101 insertions, 14 deletions
diff --git a/supervisor/shared/external_flash/devices.h b/supervisor/shared/external_flash/devices.h
index 4de22719a..05091ad8c 100644
--- a/supervisor/shared/external_flash/devices.h
+++ b/supervisor/shared/external_flash/devices.h
@@ -85,6 +85,26 @@ typedef struct {
.single_status_byte = false, \
}
+// Settings for the Adesto Tech AT25SF161-SSHD-T 2MiB SPI flash
+// for the StringCar M0 (SAMD21) Express board.
+// Source: https://www.digikey.com/product-detail/en/adesto-technologies/AT25SF161-SDHD-T/1265-1230-1-ND/
+// Datasheet: https://www.adestotech.com/wpo-content/uploads/jDS-AT25SF161_046.pdf
+#define AT25SF161 {\
+ .total_size = (1 << 21), /* 2 MiB */ \
+ .start_up_time_us = 10000, \
+ .manufacturer_id = 0x1f, \
+ .memory_type = 0x86, \
+ .capacity = 0x01, \
+ .max_clock_speed_mhz = 85, \
+ .quad_enable_bit_mask = 0x00, \
+ .has_sector_protection = true, \
+ .supports_fast_read = true, \
+ .supports_qspi = false, \
+ .supports_qspi_writes = false, \
+ .write_status_register_split = false, \
+ .single_status_byte = false, \
+}
+
// Settings for the Gigadevice GD25Q16C 2MiB SPI flash.
// Datasheet: http://www.gigadevice.com/datasheet/gd25q16c/
#define GD25Q16C {\
@@ -443,4 +463,21 @@ typedef struct {
.single_status_byte = false, \
}
+// Settings for the ISSI IS25LP128F 16MiB SPI flash.
+// Datasheet: http://www.issi.com/WW/pdf/25LP-WP128F.pdf
+#define IS25LP128F {\
+ .total_size = (1 << 24), /* 16 MiB */ \
+ .start_up_time_us = 10000, \
+ .manufacturer_id = 0x9d, \
+ .memory_type = 0x60, \
+ .capacity = 0x18, \
+ .max_clock_speed_mhz = 133, \
+ .quad_enable_bit_mask = 0x02, \
+ .has_sector_protection = true, \
+ .supports_fast_read = true, \
+ .supports_qspi = true, \
+ .supports_qspi_writes = true, \
+ .write_status_register_split = false, \
+ .single_status_byte = true, \
+}
#endif // MICROPY_INCLUDED_ATMEL_SAMD_EXTERNAL_FLASH_DEVICES_H
diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk
index 90b0e85d5..f576bc546 100644
--- a/supervisor/supervisor.mk
+++ b/supervisor/supervisor.mk
@@ -95,9 +95,69 @@ ifndef USB_HID_DEVICES
USB_HID_DEVICES = "KEYBOARD,MOUSE,CONSUMER,GAMEPAD"
endif
-# SAMD21 needs separate endpoint pairs for MSC BULK IN and BULK OUT, otherwise it's erratic.
-ifndef USB_MSC_NUM_ENDPOINT_PAIRS
-USB_MSC_NUM_ENDPOINT_PAIRS = 1
+ifndef USB_MSC_MAX_PACKET_SIZE
+USB_MSC_MAX_PACKET_SIZE = 64
+endif
+
+ifndef USB_CDC_EP_NUM_NOTIFICATION
+USB_CDC_EP_NUM_NOTIFICATION = 0
+endif
+
+ifndef USB_CDC_EP_NUM_DATA_OUT
+USB_CDC_EP_NUM_DATA_OUT = 0
+endif
+
+ifndef USB_CDC_EP_NUM_DATA_IN
+USB_CDC_EP_NUM_DATA_IN = 0
+endif
+
+ifndef USB_MSC_EP_NUM_OUT
+USB_MSC_EP_NUM_OUT = 0
+endif
+
+ifndef USB_MSC_EP_NUM_IN
+USB_MSC_EP_NUM_IN = 0
+endif
+
+ifndef USB_HID_EP_NUM_OUT
+USB_HID_EP_NUM_OUT = 0
+endif
+
+ifndef USB_HID_EP_NUM_IN
+USB_HID_EP_NUM_IN = 0
+endif
+
+ifndef USB_MIDI_EP_NUM_OUT
+USB_MIDI_EP_NUM_OUT = 0
+endif
+
+ifndef USB_MIDI_EP_NUM_IN
+USB_MIDI_EP_NUM_IN = 0
+endif
+
+USB_DESCRIPTOR_ARGS = \
+ --manufacturer $(USB_MANUFACTURER)\
+ --product $(USB_PRODUCT)\
+ --vid $(USB_VID)\
+ --pid $(USB_PID)\
+ --serial_number_length $(USB_SERIAL_NUMBER_LENGTH)\
+ --devices $(USB_DEVICES)\
+ --hid_devices $(USB_HID_DEVICES)\
+ --msc_max_packet_size $(USB_MSC_MAX_PACKET_SIZE)\
+ --cdc_ep_num_notification $(USB_CDC_EP_NUM_NOTIFICATION)\
+ --cdc_ep_num_data_out $(USB_CDC_EP_NUM_DATA_OUT)\
+ --cdc_ep_num_data_in $(USB_CDC_EP_NUM_DATA_IN)\
+ --msc_ep_num_out $(USB_MSC_EP_NUM_OUT)\
+ --msc_ep_num_in $(USB_MSC_EP_NUM_IN)\
+ --hid_ep_num_out $(USB_HID_EP_NUM_OUT)\
+ --hid_ep_num_in $(USB_HID_EP_NUM_IN)\
+ --midi_ep_num_out $(USB_MIDI_EP_NUM_OUT)\
+ --midi_ep_num_in $(USB_MIDI_EP_NUM_IN)\
+ --output_c_file $(BUILD)/autogen_usb_descriptor.c\
+ --output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h
+
+ifeq ($(USB_RENUMBER_ENDPOINTS), 0)
+USB_DESCRIPTOR_ARGS += --no-renumber_endpoints
endif
SUPERVISOR_O = $(addprefix $(BUILD)/, $(SRC_SUPERVISOR:.c=.o)) $(BUILD)/autogen_display_resources.o
@@ -111,17 +171,7 @@ $(BUILD)/autogen_usb_descriptor.c $(BUILD)/genhdr/autogen_usb_descriptor.h: auto
autogen_usb_descriptor.intermediate: ../../tools/gen_usb_descriptor.py Makefile | $(HEADER_BUILD)
$(STEPECHO) "GEN $@"
$(Q)install -d $(BUILD)/genhdr
- $(Q)$(PYTHON3) ../../tools/gen_usb_descriptor.py \
- --manufacturer $(USB_MANUFACTURER)\
- --product $(USB_PRODUCT)\
- --vid $(USB_VID)\
- --pid $(USB_PID)\
- --serial_number_length $(USB_SERIAL_NUMBER_LENGTH)\
- --devices $(USB_DEVICES)\
- --hid_devices $(USB_HID_DEVICES)\
- --msc_num_endpoint_pairs $(USB_MSC_NUM_ENDPOINT_PAIRS)\
- --output_c_file $(BUILD)/autogen_usb_descriptor.c\
- --output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h
+ $(Q)$(PYTHON3) ../../tools/gen_usb_descriptor.py $(USB_DESCRIPTOR_ARGS)
CIRCUITPY_DISPLAY_FONT ?= "../../tools/fonts/ter-u12n.bdf"