Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pinmux] Docs update #7551

Merged
merged 2 commits into from
Aug 10, 2021
Merged

[pinmux] Docs update #7551

merged 2 commits into from
Aug 10, 2021

Conversation

msfschaffner
Copy link
Contributor

@msfschaffner msfschaffner commented Jul 31, 2021

This is an overhaul of the pinmux documentation:

  1. The first commit merges the pinmux and padcontrol docs, and adds more details about the wakeup detector, sleep / retention and TAP selection features in the first commit. This also incorporates the programming model updates from this document.
  2. The second commit extends topgen with a documentation generator function that autogenerates pinout / pinmux connectivity tables for all targets of a toplevel. These tables also specify which C-enum needs to be used for a specific pad output or peripheral input when programming the pinmux config via the DIF.

Signed-off-by: Michael Schaffner [email protected]

@msfschaffner msfschaffner added the Component:Doc Documentation issue label Jul 31, 2021
@msfschaffner msfschaffner self-assigned this Jul 31, 2021
@msfschaffner msfschaffner force-pushed the pinmux-docs branch 10 times, most recently from b63a8b5 to 819f31e Compare August 4, 2021 03:42
@msfschaffner msfschaffner changed the title [pinmux] Docs update WIP [pinmux] Docs update Aug 4, 2021
@msfschaffner msfschaffner marked this pull request as ready for review August 4, 2021 03:43
@msfschaffner
Copy link
Contributor Author

CC @timothytrippel @silvestrst the autogenerated tables also list out the pinmux C-enum constants that correspond to a certain pad / peripheral input.

@msfschaffner
Copy link
Contributor Author

Sneak preview of the tables:


ASIC Target Pinout and Pinmux Connectivity

Pinout Table

Pad Name

Type

Bank

Connection

Special Function

Pinmux Insel Constant / Muxed Output Index

Description

POR_N

InputStd

VCC

manual

-

- / -

System reset

USB_P

BidirTol

VCC

manual

-

- / -

USB P signal

USB_N

BidirTol

VCC

manual

-

- / -

USB N signal

CC1

InputStd

AVCC

manual

-

- / -

ADC input 1

CC2

InputStd

AVCC

manual

-

- / -

ADC input 2

IOA0

BidirStd

VIOA

muxed

-

kTopEarlgreyPinmuxInselIoa0 / kTopEarlgreyPinmuxMioOutIoa0

Muxed IO pad

IOA1

BidirStd

VIOA

muxed

-

kTopEarlgreyPinmuxInselIoa1 / kTopEarlgreyPinmuxMioOutIoa1

Muxed IO pad

IOA2

BidirStd

VIOA

muxed

-

kTopEarlgreyPinmuxInselIoa2 / kTopEarlgreyPinmuxMioOutIoa2

Muxed IO pad

IOA3

BidirStd

VIOA

muxed

-

kTopEarlgreyPinmuxInselIoa3 / kTopEarlgreyPinmuxMioOutIoa3

Muxed IO pad

IOA4

BidirStd

VIOA

muxed

-

kTopEarlgreyPinmuxInselIoa4 / kTopEarlgreyPinmuxMioOutIoa4

Muxed IO pad

[...]

Pinmux Connectivity

Module / Signal

Connection

Pad

Pinmux Outsel Constant / Peripheral Input Index

Description

spi_host0_sd[0]

direct

SPI_HOST_D0

- / -

spi_host0_sd[1]

direct

SPI_HOST_D1

- / -

spi_host0_sd[2]

direct

SPI_HOST_D2

- / -

spi_host0_sd[3]

direct

SPI_HOST_D3

- / -

spi_device_sd[0]

direct

SPI_DEV_D0

- / -

spi_device_sd[1]

direct

SPI_DEV_D1

- / -

spi_device_sd[2]

direct

SPI_DEV_D2

- / -

spi_device_sd[3]

direct

SPI_DEV_D3

- / -

usbdev_d

manual

-

- / -

usbdev_dp

manual

-

- / -

usbdev_dn

manual

-

- / -

gpio_gpio[0]

muxed

-

kTopEarlgreyPinmuxOutselGpioGpio0 / kTopEarlgreyPinmuxPeripheralInGpioGpio0

gpio_gpio[1]

muxed

-

kTopEarlgreyPinmuxOutselGpioGpio1 / kTopEarlgreyPinmuxPeripheralInGpioGpio1

[...]

@msfschaffner msfschaffner force-pushed the pinmux-docs branch 2 times, most recently from 887d189 to 24df0f3 Compare August 4, 2021 17:58
@msfschaffner msfschaffner requested a review from cindychip August 4, 2021 19:49
@msfschaffner msfschaffner force-pushed the pinmux-docs branch 2 times, most recently from c046f61 to 908fed9 Compare August 4, 2021 21:44
Copy link
Contributor

@cindychip cindychip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a few small suggestions.

@msfschaffner msfschaffner force-pushed the pinmux-docs branch 2 times, most recently from 670ac4d to 9bb50cd Compare August 6, 2021 00:48
@msfschaffner
Copy link
Contributor Author

@tjaychen WDYT, ok to merge this?

Copy link
Contributor

@timothytrippel timothytrippel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor nits, otherwise LGTM

hw/ip/pinmux/doc/_index.md Outdated Show resolved Hide resolved
hw/ip/pinmux/doc/_index.md Outdated Show resolved Hide resolved
hw/ip/pinmux/doc/_index.md Outdated Show resolved Hide resolved
hw/ip/pinmux/doc/_index.md Outdated Show resolved Hide resolved
hw/ip/pinmux/doc/_index.md Outdated Show resolved Hide resolved
hw/ip/pinmux/doc/_index.md Outdated Show resolved Hide resolved
hw/ip/pinmux/doc/_index.md Outdated Show resolved Hide resolved
msfschaffner and others added 2 commits August 9, 2021 17:30
This adds a top-level doc generation function which currently
generates pinout and pinmux connectivity tables for all targets (ASIC,
CW310 etc) of a specific top-level.

More documentation generation functions can be added in the future, if
needed.

Signed-off-by: Michael Schaffner <[email protected]>
@msfschaffner
Copy link
Contributor Author

Thanks @timothytrippel for the review! Amended and rebased.

@msfschaffner msfschaffner merged commit 426ed20 into lowRISC:master Aug 10, 2021
@msfschaffner
Copy link
Contributor Author

Merging this in for now. Let me know if you see anything that should be amended, and I'll fix that in a follow up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:Doc Documentation issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants