/** * struct mtk_drv_group_desc - Provide driving group data. * @max_drv: The maximum current of this group. * @min_drv: The minimum current of this group. * @low_bit: The lowest bit of this group. * @high_bit: The highest bit of this group. * @step: The step current of this group.
*/ struct mtk_drv_group_desc { unsignedchar min_drv; unsignedchar max_drv; unsignedchar low_bit; unsignedchar high_bit; unsignedchar step;
};
/** * struct mtk_pin_drv_grp - Provide each pin driving info. * @pin: The pin number. * @offset: The offset of driving register for this pin. * @bit: The bit of driving register for this pin. * @grp: The group for this pin belongs to.
*/ struct mtk_pin_drv_grp { unsignedshort pin; unsignedshort offset; unsignedchar bit; unsignedchar grp;
};
/** * struct mtk_pin_spec_pupd_set_samereg * - For special pins' pull up/down setting which resides in same register * @pin: The pin number. * @offset: The offset of special pull up/down setting register. * @pupd_bit: The pull up/down bit in this register. * @r0_bit: The r0 bit of pull resistor. * @r1_bit: The r1 bit of pull resistor.
*/ struct mtk_pin_spec_pupd_set_samereg { unsignedshort pin; unsignedshort offset; unsignedchar pupd_bit; unsignedchar r1_bit; unsignedchar r0_bit;
};
/** * struct mtk_pin_ies_set - For special pins' ies and smt setting. * @start: The start pin number of those special pins. * @end: The end pin number of those special pins. * @offset: The offset of special setting register. * @bit: The bit of special setting register.
*/ struct mtk_pin_ies_smt_set { unsignedshort start; unsignedshort end; unsignedshort offset; unsignedchar bit;
};
/** * struct mtk_pinctrl_devdata - Provide HW GPIO related data. * @pins: An array describing all pins the pin controller affects. * @npins: The number of entries in @pins. * * @grp_desc: The driving group info. * @pin_drv_grp: The driving group for all pins. * @spec_ies: Special pin setting for input enable * @n_spec_ies: Number of entries in spec_ies * @spec_pupd: Special pull up/down setting * @n_spec_pupd: Number of entries in spec_pupd * @spec_smt: Special pin setting for schmitt * @n_spec_smt: Number of entries in spec_smt * @spec_pull_set: Each SoC may have special pins for pull up/down setting, * these pins' pull setting are very different, they have separate pull * up/down bit, R0 and R1 resistor bit, so they need special pull setting. * If special setting is success, this should return 0, otherwise it should * return non-zero value. * @spec_ies_smt_set: Some pins are irregular, their input enable and smt * control register are discontinuous, but they are mapping together. That * means when user set smt, input enable is set at the same time. So they * also need special control. If special control is success, this should * return 0, otherwise return non-zero value. * @spec_pinmux_set: In some cases, there are two pinmux functions share * the same value in the same segment of pinmux control register. If user * want to use one of the two functions, they need an extra bit setting to * select the right one. * @spec_dir_set: In very few SoCs, direction control registers are not * arranged continuously, they may be cut to parts. So they need special * dir setting. * @mt8365_set_clr_mode: In mt8365, some pins won't set correcty because they * need to use the main R/W register to read/update/write the modes instead of * the SET/CLR register. * * @dir_offset: The direction register offset. * @pullen_offset: The pull-up/pull-down enable register offset. * @pinmux_offset: The pinmux register offset. * * @type1_start: Some chips have two base addresses for pull select register, * that means some pins use the first address and others use the second. This * member record the start of pin number to use the second address. * @type1_end: The end of pin number to use the second address. * * @port_shf: The shift between two registers. * @port_mask: The mask of register. * @port_align: Provide clear register and set register step.
*/ struct mtk_pinctrl_devdata { conststruct mtk_desc_pin *pins; unsignedint npins; conststruct mtk_drv_group_desc *grp_desc; unsignedint n_grp_cls; conststruct mtk_pin_drv_grp *pin_drv_grp; unsignedint n_pin_drv_grps; conststruct mtk_pin_ies_smt_set *spec_ies; unsignedint n_spec_ies; conststruct mtk_pin_spec_pupd_set_samereg *spec_pupd; unsignedint n_spec_pupd; conststruct mtk_pin_ies_smt_set *spec_smt; unsignedint n_spec_smt; int (*spec_pull_set)(struct regmap *regmap, conststruct mtk_pinctrl_devdata *devdata, unsignedint pin, bool isup, unsignedint r1r0); int (*spec_ies_smt_set)(struct regmap *reg, conststruct mtk_pinctrl_devdata *devdata, unsignedint pin, int value, enum pin_config_param arg); void (*spec_pinmux_set)(struct regmap *reg, unsignedint pin, unsignedint mode); void (*spec_dir_set)(unsignedint *reg_addr, unsignedint pin); int (*mt8365_set_clr_mode)(struct regmap *regmap, unsignedint bit, unsignedint reg_pullen, unsignedint reg_pullsel, bool enable, bool isup); unsignedint dir_offset; unsignedint ies_offset; unsignedint smt_offset; unsignedint pullen_offset; unsignedint pullsel_offset; unsignedint drv_offset; unsignedint dout_offset; unsignedint din_offset; unsignedint pinmux_offset; unsignedshort type1_start; unsignedshort type1_end; unsignedchar port_shf; unsignedchar port_mask; unsignedchar port_align; struct mtk_eint_hw eint_hw; struct mtk_eint_regs *eint_regs; unsignedint mode_mask; unsignedint mode_per_reg; unsignedint mode_shf;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.