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

Update pinmux mapping diagram to match top_config.toml #343

Merged
merged 5 commits into from
Nov 11, 2024

Conversation

AlexJones0
Copy link
Contributor

@AlexJones0 AlexJones0 commented Nov 8, 2024

See the commit messages for more details. This PR only updates the pin mapping diagram to fix issues in the diagram and to make it match the latest top_config.toml configuration, and makes no change to any code (SW/HW) at all - just the documentation.

The changes include:

  • Swapping RPH SPI CE0&1 - this is already correct in top_config.toml, but the diagram gets these two chip enables the wrong way around. See top_config.toml and pinout.xyz to see why this change is necessary.
  • Updates the SPI names, so that spi_board now becomes spi_0, spi_0 becomes spi_1 and spi_1 becomes spi_2, to represent the corresponding changes to top_config.toml after the flash Flash/MicroSD SPI was added back through pinmux. See Moved the memories spi block back into the pinmux. #326 where this change was made.
  • Changes the PMOD{0,1} pin names to match the corresponding names in top_config.toml. That is, it changes names like PMOD0_5, PMOD0_6, PMOD0_7 and PMOD0_8 to PMOD0_7, PMOD0_8, PMOD0_9 and PMOD0_10 to better match the PMOD names used in the Digilent specification. Again see Moved the memories spi block back into the pinmux. #326 where this change was made.
  • Fixes a small typo for PMOD1_4: "sca" -> "sda". See the error here and the correct line in top_config.toml here.
  • Adds the RS485 RX and TX pins to the pin mapping diagram. Designed to match the description of RS485 given in top_config.toml.
  • Updates the Raspberry Pi HAT header's pin names to remove references to SPI pins. See commit e0e3a23 of Moved the memories spi block back into the pinmux. #326 again to see where this change was made.

This is already correct in `top_config.toml`, but the diagram gets
these two chip enables the wrong way around and doesn't match the actual
config correctly.
In the latest RTL changes, `spi_board` was changed to go back through
Pinmux, and hence it became `spi0` again (this is the SPI for flash and
MicroSD). Hence SPI0 now becomes SPI1 and SPI1 becomes SPI2. This is
already up-to-date and working in `top_config.toml`, but until this
commit it had not yet been updated to reflect that in the pin mapping
diagram.
marnovandermaas
marnovandermaas previously approved these changes Nov 8, 2024
Copy link
Contributor

@marnovandermaas marnovandermaas left a comment

Choose a reason for hiding this comment

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

Yup, that's the right way around.

`top_config.toml` was already updated to change the names of
`PMOD{0,1}_{5,6,7,8}` to `PMOD{0,1}_{7,8,9,10}`. This commit updates the
pin mapping diagram to match the names of these pins accordingly. This
change was originally made so that pin names better reflect the
numbers/names given to pins by the Digilent specification, and not the
pin names on the schematic.

Also fixes a minor typo for `pmod1_4`, which said "sca" rather than
"sda" for the I2C1 Serial Data pin.
Update the pin mapping diagram to match `top_config.toml` by adding the
RS485 TX and RX pins to the pin mapping diagram, which are mapped to
UART2's TX and RX respectively.
@AlexJones0 AlexJones0 changed the title Update pinmux mapping diagram to map RPH SPI CE0&1 correctly Update pinmux mapping diagram to match top_config.toml Nov 8, 2024
@AlexJones0
Copy link
Contributor Author

AlexJones0 commented Nov 8, 2024

Latest force push addresses other inconsistencies in the pin mapping diagram: it updates the SPI names/numbering, fixes a typo, changes the PMOD0 and PMOD1 pin name numbering to match top_config.toml, and adds the missing RS485 pins.

(requesting re-review from @marnovandermaas because he only reviewed the original commit).

Copy link
Member

@HU90m HU90m left a comment

Choose a reason for hiding this comment

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

great! thanks for doing this Alex

doc/ip/pinmux/pin_mappings.dot Outdated Show resolved Hide resolved
The pin names for the Raspberry Pi HAT header's pins in
`top_config.toml` had already been stripped to remove references to
specific SPI pins (e.g. CE0, CE1, COPI, CIPO, SCK), because of the
inconsistencies between the usage of SPI pins on some devices, and to
avoid confusion between SPI0/SPI1 and the blocks that are referred to as
SPI0/SPI1 on our board (in reality, SPI0 on RPH uses our SPI1, and SPI1
on RPH maps to use our SPI2).

This commit just updates the pin mapping diagram to reflect the existing
changes to `top_config.toml` and the RTL.
@marnovandermaas marnovandermaas merged commit 10f44be into lowRISC:main Nov 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants