Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To enable pin-controller driver in the kernel, the following configuration options need to be enabled:

Code Block
CONFIG_PINCTRL=y
CONFIG_PINCTRL_ZYNQ=y
CONFIG_ARCH_ZYNQ=y
CONFIG_PINMUX=y
CONFIG_GENERIC_PINCONF=y

Devicetree

Code Block
pinctrl0: pinctrl {
        compatible = "xlnx,pinctrl-zynq";
		reg = <0x700 0x200>;
		syscon = <&slcr>;
        pinctrl_uart1_default: uart1-default {
			mux {
				groups = "uart1_10_grp";
				function = "uart1";
			};
  
			conf {
				groups = "uart1_10_grp";
				slew-rate = <0>;
				io-standard = <1>;
			};
  
			conf-rx {
				pins = "MIO49";
				bias-high-impedance;
			};
  
			conf-tx {
				pins = "MIO48";
				bias-disable;
			};
	};
};

Test procedure

The drivers are tested on actual Zc702 board. Kernel logs are used to validate the functionality of the drivers. For negative testing,
errors are deliberately injected in the device tree blob’s pin control nodes and then the functionality of the peripheral is checked.
The testing observations (Kernel Logs) for I2C bus is mentioned hereafter. It can be seen from the kernel logs that under ideal scenario I2C is probed,
pins are properly configured, I2C bus entries are added and EEPROM is successfully attached over I2C, but under error scenarios pin control shouts for error,
no I2C busses are added as well as EEPROM node is not found.

...

  • Updated with module_platform_driver() to simplify the code.

Commits:

2021.2

Summary:

  • Add support for 'power-source' parameter

Commits:

Related Links

https://github.com/Xilinx/linux-xlnx/blob/master/drivers/pinctrl/pinctrl-zynq.c