[PATCH v3 1/3] firmware: xilinx: Add pinctrl support

Nobuhiro Iwamatsu iwamatsu at nigauri.org
Sat Feb 27 19:17:56 EST 2021


Hi,

2021年2月12日(金) 21:10 Sai Krishna Potthuri
<lakshmi.sai.krishna.potthuri at xilinx.com>:
>
> Adding pinctrl support to query platform specific information (pins)
> from firmware.
>
> Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri at xilinx.com>
> Acked-by: Michal Simek <michal.simek at xilinx.com>
> ---
>  drivers/firmware/xilinx/zynqmp.c     | 114 +++++++++++++++++++++++++++
>  include/linux/firmware/xlnx-zynqmp.h |  90 +++++++++++++++++++++
>  2 files changed, 204 insertions(+)
>
> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
> index efb8a66efc68..299c3d5a9ebd 100644
> --- a/drivers/firmware/xilinx/zynqmp.c
> +++ b/drivers/firmware/xilinx/zynqmp.c
> @@ -784,6 +784,120 @@ int zynqmp_pm_fpga_get_status(u32 *value)
>  }
>  EXPORT_SYMBOL_GPL(zynqmp_pm_fpga_get_status);
>

<snip>

> @@ -125,6 +131,12 @@ enum pm_query_id {
>         PM_QID_CLOCK_GET_FIXEDFACTOR_PARAMS,
>         PM_QID_CLOCK_GET_PARENTS,
>         PM_QID_CLOCK_GET_ATTRIBUTES,
> +       PM_QID_PINCTRL_GET_NUM_PINS = 6,
> +       PM_QID_PINCTRL_GET_NUM_FUNCTIONS = 7,
> +       PM_QID_PINCTRL_GET_NUM_FUNCTION_GROUPS = 8,
> +       PM_QID_PINCTRL_GET_FUNCTION_NAME = 9,
> +       PM_QID_PINCTRL_GET_FUNCTION_GROUPS = 10,
> +       PM_QID_PINCTRL_GET_PIN_GROUPS = 11,

These do not have to have values, Because PM_QID_INVALID is 0.

>         PM_QID_CLOCK_GET_NUM_CLOCKS = 12,

And you can drop value from this.

>         PM_QID_CLOCK_GET_MAX_DIVISOR,
>  };
> @@ -288,6 +300,44 @@ enum dll_reset_type {
>         PM_DLL_RESET_PULSE,
>  };
>
> +enum pm_pinctrl_config_param {
> +       PM_PINCTRL_CONFIG_SLEW_RATE = 0,
> +       PM_PINCTRL_CONFIG_BIAS_STATUS = 1,
> +       PM_PINCTRL_CONFIG_PULL_CTRL = 2,
> +       PM_PINCTRL_CONFIG_SCHMITT_CMOS = 3,
> +       PM_PINCTRL_CONFIG_DRIVE_STRENGTH = 4,
> +       PM_PINCTRL_CONFIG_VOLTAGE_STATUS = 5,
> +       PM_PINCTRL_CONFIG_TRI_STATE = 6,
> +       PM_PINCTRL_CONFIG_MAX = 7,
> +};

Same as above.

> +
> +enum pm_pinctrl_slew_rate {
> +       PM_PINCTRL_SLEW_RATE_FAST = 0,
> +       PM_PINCTRL_SLEW_RATE_SLOW = 1,
> +};

Same as above. Others are also specified.

> +
> +enum pm_pinctrl_bias_status {
> +       PM_PINCTRL_BIAS_DISABLE = 0,
> +       PM_PINCTRL_BIAS_ENABLE = 1,
> +};

Best regards,
  Nobuhiro
-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6



More information about the linux-arm-kernel mailing list