ECE 440 · Week 2

Modern Computer: Full Stack

A pinmux row has a pad, the function you claim, the function you must not claim, and an electrical limit.

Week 2 of 10 · Solitude

ECE 440 · Week 2 · In class

A pinmux row has a pad, the function you claim, the function you must not claim, and an electrical limit.

ECE 440 · Week 2 · In class

The pin number for your pad is the number the station sheet prints for that pad.

ECE 440 · Week 2 · Lecture

Each pin has a role on this board

139240
  • 5 V
  • 3.3 V
  • Ground
  • I2C
  • SPI
  • UART
  • PWM
  • TDM
  • PDM

Colours as on the Solitude pinout, where each pin's name is. The square pad is pin 1.

ECE 440 · Week 2 · Lecture

Pad, pin, function

ECE 440 · Week 2 · Lecture

How the device tree claims a pad

&mydev {
	pinctrl-names = "default";
	pinctrl-0 = <&mydev_pins>;
	status = "okay";
};

ECE 440 · Week 2 · Lecture

Reading what is claimed now

# the tree the kernel booted with
dtc -I fs -O dts /proc/device-tree > live.dts

# which pads are claimed, and by whom (root, debugfs)
ls /sys/kernel/debug/pinctrl/
cat /sys/kernel/debug/pinctrl/*/pinmux-pins

Each row of pinmux-pins names a pad and the device that owns it, or says it is unclaimed.

ECE 440 · Week 2 · Lecture

The four columns

ColumnWhere it comes from
PadThe pin group in the device tree
Function claimedThe group your node selects
Function not claimedAnother function the same pad offers
Electrical limitThe header's I/O voltage and drive current

ECE 440 · Week 2 · Lecture

Electrical limits are part of the row

ECE 440 · Week 2 · Lab

Lab

  1. For the header device your driver will bind, fill a pinmux table from the board's device tree: the pad, the function you claim, the function you must not claim, and the header's electrical limit.
  2. The overlay file stays in the repository. The graded page is the table. Second pass: add one more pad you will not claim, then remove it from the graded page.

ECE 440 · Week 2 · Lab

Lab (continued)

  1. Assemble the lab hand-in: The pinmux table: pad, function claimed, function that must not be claimed, and the electrical limit.

ECE 440 · Week 2 · Lab

Hand in

The pinmux table: pad, function claimed, function that must not be claimed, and the electrical limit.

ECE 440 · Week 2 · Homework

Homework

ECE 440 · Week 2 · Homework

Turn in

The pin number and the function left alone.

ECE 440 · Week 2 · Read

Read

On the lab site: Module 9, Device tree and pin multiplexing, explains muxing. This week grades the four-column table.

ECE 440 · Week 2 · Next

Week 3

No Monday lecture.

Arrow keys or space to move, F for full screen, N for speaker notes, Home and End for the first and last slide. Print gives one slide per page.