Add Actions Semi S700 pinctrl support
Subsystems (4)
v2 cover Add Actions Semi S700 pinctrl support
This patchset adds pinctrl support for Actions Semi S700 SoC. Pinmux functions are only accessible for pin groups while pinconf parameters are available for both pin groups and individual pins.
pinctrl driver is verified using the Cubieboard7.
common functionalities from s900 is moved for all Actions Semi SoC's usage.
Common pad control configurations are moved to SoC specific
dts entry for pinctrl depends on clock driver which is still under review:
https://patchwork.kernel.org/patch/10533959/
Thanks,
Saravanan
Parthiban
Changelog in v2
- GPIO Interrupt support is added
- Device tree entry for GPIO and Interrupt configured
- GPIO and pinctrl define reorder, commit message findings fixed
depends on owl GPIO Interrupt support
https://patchwork.kernel.org/patch/10483477/
Saravanan Sekar (5):
pinctrl: actions: define constructor generic to Actions Semi SoC's
pinctrl: actions: define pad control configurtion to SoC specific
dt-bindings: pinctrl: Add bindings for Actions Semi S700 SoC
pinctrl: actions: Add Actions Semi S700 pinctrl driver
arm64: dts: actions: Add pinctrl node for Actions Semi S700
.../bindings/pinctrl/actions,s700-pinctrl.txt | 170 ++ arch/arm64/boot/dts/actions/s700.dtsi | 16 + drivers/pinctrl/actions/Kconfig | 6 + drivers/pinctrl/actions/Makefile | 1 + drivers/pinctrl/actions/pinctrl-owl.c | 71 +- drivers/pinctrl/actions/pinctrl-owl.h | 142 +- drivers/pinctrl/actions/pinctrl-s700.c | 1925 +++++++++++++++++ drivers/pinctrl/actions/pinctrl-s900.c | 205 +- 8 files changed, 2337 insertions(+), 199 deletions(-) create mode 100644 Documentation/devicetree/bindings/pinctrl/actions,s700-pinctrl.txt create mode 100644 drivers/pinctrl/actions/pinctrl-s700.c
Signature · 1 line
2.18.0
PATCH v2 1/5 pinctrl: actions: define constructor generic to Actions Semi SoC's
Move generic defines common to the Owl family out of S900 driver.
--- drivers/pinctrl/actions/pinctrl-owl.h | 136 ++++++++++++++++++++++-- drivers/pinctrl/actions/pinctrl-s900.c | 139 ++----------------------- 2 files changed, 136 insertions(+), 139 deletions(-)
drivers/pinctrl/actions/pinctrl-owl.h +130 -6
@@ -15,12 +15,135 @@#define OWL_PINCONF_SLEW_SLOW 0#define OWL_PINCONF_SLEW_FAST 1 -enum owl_pinconf_pull { -OWL_PINCONF_PULL_HIZ , -OWL_PINCONF_PULL_DOWN , -OWL_PINCONF_PULL_UP , -OWL_PINCONF_PULL_HOLD , -}; +#define MUX_PG (group_name, reg, shift, width) \ + { \ + .name = #group_name, \ + .pads = group_name##_pads, \ + .npads = ARRAY_SIZE(group_name##_pads), \ + .funcs = group_name##_funcs, \ + .nfuncs = ARRAY_SIZE(group_name##_funcs), \ + .mfpctl_reg = MFCTL##reg, \ + .mfpctl_shift = shift, \ + .mfpctl_width = width, \ + .drv_reg = -1, \ + .drv_shift = -1, \ + .drv_width = -1, \ + .sr_reg = -1, \ + .sr_shift = -1, \ + .sr_width = -1, \ + } + +#define DRV_PG (group_name, reg, shift, width) \ + { \ + .name = #group_name, \ + .pads = group_name##_pads, \ + .npads = ARRAY_SIZE(group_name##_pads), \ + .mfpctl_reg = -1, \ + .mfpctl_shift = -1, \ + .mfpctl_width = -1, \ + .drv_reg = PAD_DRV##reg, \ + .drv_shift = shift, \ + .drv_width = width, \ + .sr_reg = -1, \ + .sr_shift = -1, \ + .sr_width = -1, \ + } + +#define SR_PG (group_name, reg, shift, width) \ + { \ + .name = #group_name, \ + .pads = group_name##_pads, \ + .npads = ARRAY_SIZE(group_name##_pads), \ + .mfpctl_reg = -1, \ + .mfpctl_shift = -1, \ + .mfpctl_width = -1, \ + .drv_reg = -1, \ + .drv_shift = -1, \ + .drv_width = -1, \ + .sr_reg = PAD_SR##reg, \ + .sr_shift = shift, \ + .sr_width = width, \ + } + +#define FUNCTION (fname) \ + { \ + .name = #fname, \ + .groups = fname##_groups, \ + .ngroups = ARRAY_SIZE(fname##_groups), \ + } + +/* PAD PULL UP/DOWN CONFIGURES */ +#define PULLCTL_CONF (pull_reg, pull_sft, pull_wdt) \ + { \ + .reg = PAD_PULLCTL##pull_reg, \ + .shift = pull_sft, \ + .width = pull_wdt, \ + } + +#define PAD_PULLCTL_CONF (pad_name, pull_reg, pull_sft, pull_wdt) \ + struct owl_pullctl pad_name##_pullctl_conf \ + = PULLCTL_CONF(pull_reg, pull_sft, pull_wdt) + +#define ST_CONF (st_reg, st_sft, st_wdt) \ + { \ + .reg = PAD_ST##st_reg, \ + .shift = st_sft, \ + .width = st_wdt, \ + } + +#define PAD_ST_CONF (pad_name, st_reg, st_sft, st_wdt) \ + struct owl_st pad_name##_st_conf \ + = ST_CONF(st_reg, st_sft, st_wdt) + +#define PAD_INFO (name) \ + { \ + .pad = name, \ + .pullctl = NULL, \ + .st = NULL, \ + } + +#define PAD_INFO_ST (name) \ + { \ + .pad = name, \ + .pullctl = NULL, \ + .st = &name##_st_conf, \ + } + +#define PAD_INFO_PULLCTL (name) \ + { \ + .pad = name, \ + .pullctl = &name##_pullctl_conf, \ + .st = NULL, \ + } + +#define PAD_INFO_PULLCTL_ST (name) \ + { \ + .pad = name, \ + .pullctl = &name##_pullctl_conf, \ + .st = &name##_st_conf, \ + } + +#define OWL_GPIO_PORT_A 0 +#define OWL_GPIO_PORT_B 1 +#define OWL_GPIO_PORT_C 2 +#define OWL_GPIO_PORT_D 3 +#define OWL_GPIO_PORT_E 4 +#define OWL_GPIO_PORT_F 5 + +#define OWL_GPIO_PORT (port, base, count, _outen, _inen, _dat, _intc_ctl,\ + _intc_pd, _intc_msk, _intc_type, _share) \ + [OWL_GPIO_PORT_##port] = { \ + .offset = base, \ + .pins = count, \ + .outen = _outen, \ + .inen = _inen, \ + .dat = _dat, \ + .intc_ctl = _intc_ctl, \ + .intc_pd = _intc_pd, \ + .intc_msk = _intc_msk, \ + .intc_type = _intc_type, \ + .shared_ctl_offset = _share, \ + }enum owl_pinconf_drv {OWL_PINCONF_DRV_2MA ,
@@ -148,6 +271,7 @@ struct owl_gpio_port {unsigned int intc_pd;unsigned int intc_msk;unsigned int intc_type; +u8 shared_ctl_offset; };/**
drivers/pinctrl/actions/pinctrl-s900.c +6 -133
176 lines not on this page · raw message
Signature · 1 line
2.18.0
kbuild test robot
build botRe: [PATCH v2 1/5] pinctrl: actions: define constructor generic to Actions Semi SoC's
Thank you for the patch! Yet something to improve:
Hi Saravanan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pinctrl/devel]
[also build test ERROR on next-20180727]
[cannot apply to v4.18-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Saravanan-Sekar/Add-Actions-Semi-S700-pinctrl-support/20180730-022827 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=ia64
Note: the linux-review/Saravanan-Sekar/Add-Actions-Semi-S700-pinctrl-support/20180730-022827 HEAD edc8b81de011f2413aa90b738a8fad302e281785 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
drivers/pinctrl/actions/pinctrl-owl.c: In function 'owl_pad_pinconf_arg2val':
drivers/pinctrl/actions/pinctrl-owl.c:255:10: error: 'OWL_PINCONF_PULL_HOLD' undeclared (first use in this function); did you mean 'OWL_PINCONF_DRV_12MA'?
*arg = OWL_PINCONF_PULL_HOLD;
^~~~~~~~~~~~~~~~~~~~~
OWL_PINCONF_DRV_12MA
drivers/pinctrl/actions/pinctrl-owl.c:255:10: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/pinctrl/actions/pinctrl-owl.c:258:10: error: 'OWL_PINCONF_PULL_HIZ' undeclared (first use in this function); did you mean 'OWL_PINCONF_DRV_8MA'?
*arg = OWL_PINCONF_PULL_HIZ;
^~~~~~~~~~~~~~~~~~~~
OWL_PINCONF_DRV_8MA
>> drivers/pinctrl/actions/pinctrl-owl.c:261:10: error: 'OWL_PINCONF_PULL_DOWN' undeclared (first use in this function); did you mean 'OWL_PINCONF_SLEW_SLOW'?
*arg = OWL_PINCONF_PULL_DOWN;
^~~~~~~~~~~~~~~~~~~~~
OWL_PINCONF_SLEW_SLOW
>> drivers/pinctrl/actions/pinctrl-owl.c:264:10: error: 'OWL_PINCONF_PULL_UP' undeclared (first use in this function); did you mean 'OWL_PINCONF_DRV_8MA'?
*arg = OWL_PINCONF_PULL_UP;
^~~~~~~~~~~~~~~~~~~
OWL_PINCONF_DRV_8MA
drivers/pinctrl/actions/pinctrl-owl.c: In function 'owl_pad_pinconf_val2arg':
drivers/pinctrl/actions/pinctrl-owl.c:282:18: error: 'OWL_PINCONF_PULL_HOLD' undeclared (first use in this function); did you mean 'OWL_PINCONF_DRV_12MA'?
*arg = *arg == OWL_PINCONF_PULL_HOLD;
^~~~~~~~~~~~~~~~~~~~~
OWL_PINCONF_DRV_12MA
drivers/pinctrl/actions/pinctrl-owl.c:285:18: error: 'OWL_PINCONF_PULL_HIZ' undeclared (first use in this function); did you mean 'OWL_PINCONF_DRV_8MA'?
*arg = *arg == OWL_PINCONF_PULL_HIZ;
^~~~~~~~~~~~~~~~~~~~
OWL_PINCONF_DRV_8MA
drivers/pinctrl/actions/pinctrl-owl.c:288:18: error: 'OWL_PINCONF_PULL_DOWN' undeclared (first use in this function); did you mean 'OWL_PINCONF_SLEW_SLOW'?
*arg = *arg == OWL_PINCONF_PULL_DOWN;
^~~~~~~~~~~~~~~~~~~~~
OWL_PINCONF_SLEW_SLOW
drivers/pinctrl/actions/pinctrl-owl.c:291:18: error: 'OWL_PINCONF_PULL_UP' undeclared (first use in this function); did you mean 'OWL_PINCONF_DRV_8MA'?
*arg = *arg == OWL_PINCONF_PULL_UP;
^~~~~~~~~~~~~~~~~~~
OWL_PINCONF_DRV_8MAvim +258 drivers/pinctrl/actions/pinctrl-owl.c
2242ddfb Manivannan Sadhasivam 2018-04-04 248
2242ddfb Manivannan Sadhasivam 2018-04-04 249 static int owl_pad_pinconf_arg2val(const struct owl_padinfo *info,
2242ddfb Manivannan Sadhasivam 2018-04-04 250 unsigned int param,
2242ddfb Manivannan Sadhasivam 2018-04-04 251 u32 *arg)
2242ddfb Manivannan Sadhasivam 2018-04-04 252 {
2242ddfb Manivannan Sadhasivam 2018-04-04 253 switch (param) {
2242ddfb Manivannan Sadhasivam 2018-04-04 254 case PIN_CONFIG_BIAS_BUS_HOLD:
2242ddfb Manivannan Sadhasivam 2018-04-04 @255 *arg = OWL_PINCONF_PULL_HOLD;
2242ddfb Manivannan Sadhasivam 2018-04-04 256 break;
2242ddfb Manivannan Sadhasivam 2018-04-04 257 case PIN_CONFIG_BIAS_HIGH_IMPEDANCE:
2242ddfb Manivannan Sadhasivam 2018-04-04 @258 *arg = OWL_PINCONF_PULL_HIZ;
2242ddfb Manivannan Sadhasivam 2018-04-04 259 break;
2242ddfb Manivannan Sadhasivam 2018-04-04 260 case PIN_CONFIG_BIAS_PULL_DOWN:
2242ddfb Manivannan Sadhasivam 2018-04-04 @261 *arg = OWL_PINCONF_PULL_DOWN;
2242ddfb Manivannan Sadhasivam 2018-04-04 262 break;
2242ddfb Manivannan Sadhasivam 2018-04-04 263 case PIN_CONFIG_BIAS_PULL_UP:
2242ddfb Manivannan Sadhasivam 2018-04-04 @264 *arg = OWL_PINCONF_PULL_UP;
2242ddfb Manivannan Sadhasivam 2018-04-04 265 break;
2242ddfb Manivannan Sadhasivam 2018-04-04 266 case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
2242ddfb Manivannan Sadhasivam 2018-04-04 267 *arg = (*arg >= 1 ? 1 : 0);
2242ddfb Manivannan Sadhasivam 2018-04-04 268 break;
2242ddfb Manivannan Sadhasivam 2018-04-04 269 default:
2242ddfb Manivannan Sadhasivam 2018-04-04 270 return -ENOTSUPP;
2242ddfb Manivannan Sadhasivam 2018-04-04 271 }
2242ddfb Manivannan Sadhasivam 2018-04-04 272
2242ddfb Manivannan Sadhasivam 2018-04-04 273 return 0;
2242ddfb Manivannan Sadhasivam 2018-04-04 274 }
2242ddfb Manivannan Sadhasivam 2018-04-04 275 :::::: The code at line 258 was first introduced by commit
:::::: 2242ddfbf4d699b58d12467bbebae167d7563700 pinctrl: actions: Add Actions S900 pinctrl driver
:::::: TO: Manivannan Sadhasivam <[email protected]> :::::: CC: Linus Walleij <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 50918 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180730/b65c8fbc/attachment-0001.gz>
kbuild test robot
build botRe: [PATCH v2 1/5] pinctrl: actions: define constructor generic to Actions Semi SoC's
In reply to Saravanan SekarThank you for the patch! Yet something to improve:
Hi Saravanan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pinctrl/devel]
[also build test ERROR on next-20180727]
[cannot apply to v4.18-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Saravanan-Sekar/Add-Actions-Semi-S700-pinctrl-support/20180730-022827 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel config: sparc64-allmodconfig (attached as .config) compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=sparc64
Note: the linux-review/Saravanan-Sekar/Add-Actions-Semi-S700-pinctrl-support/20180730-022827 HEAD edc8b81de011f2413aa90b738a8fad302e281785 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
drivers/pinctrl/actions/pinctrl-owl.c: In function 'owl_pad_pinconf_arg2val':
>> drivers/pinctrl/actions/pinctrl-owl.c:255:10: error: 'OWL_PINCONF_PULL_HOLD' undeclared (first use in this function); did you mean 'OWL_PINCONF_DRV_12MA'?
*arg = OWL_PINCONF_PULL_HOLD;
^~~~~~~~~~~~~~~~~~~~~
OWL_PINCONF_DRV_12MA
drivers/pinctrl/actions/pinctrl-owl.c:255:10: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/pinctrl/actions/pinctrl-owl.c:258:10: error: 'OWL_PINCONF_PULL_HIZ' undeclared (first use in this function); did you mean 'OWL_PINCONF_PULL_HOLD'?
*arg = OWL_PINCONF_PULL_HIZ;
^~~~~~~~~~~~~~~~~~~~
OWL_PINCONF_PULL_HOLD
>> drivers/pinctrl/actions/pinctrl-owl.c:261:10: error: 'OWL_PINCONF_PULL_DOWN' undeclared (first use in this function); did you mean 'OWL_PINCONF_PULL_HOLD'?
*arg = OWL_PINCONF_PULL_DOWN;
^~~~~~~~~~~~~~~~~~~~~
OWL_PINCONF_PULL_HOLD
>> drivers/pinctrl/actions/pinctrl-owl.c:264:10: error: 'OWL_PINCONF_PULL_UP' undeclared (first use in this function); did you mean 'OWL_PINCONF_PULL_HIZ'?
*arg = OWL_PINCONF_PULL_UP;
^~~~~~~~~~~~~~~~~~~
OWL_PINCONF_PULL_HIZ
drivers/pinctrl/actions/pinctrl-owl.c: In function 'owl_pad_pinconf_val2arg':
drivers/pinctrl/actions/pinctrl-owl.c:282:18: error: 'OWL_PINCONF_PULL_HOLD' undeclared (first use in this function); did you mean 'OWL_PINCONF_DRV_12MA'?
*arg = *arg == OWL_PINCONF_PULL_HOLD;
^~~~~~~~~~~~~~~~~~~~~
OWL_PINCONF_DRV_12MA
drivers/pinctrl/actions/pinctrl-owl.c:285:18: error: 'OWL_PINCONF_PULL_HIZ' undeclared (first use in this function); did you mean 'OWL_PINCONF_PULL_HOLD'?
*arg = *arg == OWL_PINCONF_PULL_HIZ;
^~~~~~~~~~~~~~~~~~~~
OWL_PINCONF_PULL_HOLD
drivers/pinctrl/actions/pinctrl-owl.c:288:18: error: 'OWL_PINCONF_PULL_DOWN' undeclared (first use in this function); did you mean 'OWL_PINCONF_PULL_HOLD'?
*arg = *arg == OWL_PINCONF_PULL_DOWN;
^~~~~~~~~~~~~~~~~~~~~
OWL_PINCONF_PULL_HOLD
drivers/pinctrl/actions/pinctrl-owl.c:291:18: error: 'OWL_PINCONF_PULL_UP' undeclared (first use in this function); did you mean 'OWL_PINCONF_PULL_HIZ'?
*arg = *arg == OWL_PINCONF_PULL_UP;
^~~~~~~~~~~~~~~~~~~
OWL_PINCONF_PULL_HIZvim +255 drivers/pinctrl/actions/pinctrl-owl.c
2242ddfb Manivannan Sadhasivam 2018-04-04 248
2242ddfb Manivannan Sadhasivam 2018-04-04 249 static int owl_pad_pinconf_arg2val(const struct owl_padinfo *info,
2242ddfb Manivannan Sadhasivam 2018-04-04 250 unsigned int param,
2242ddfb Manivannan Sadhasivam 2018-04-04 251 u32 *arg)
2242ddfb Manivannan Sadhasivam 2018-04-04 252 {
2242ddfb Manivannan Sadhasivam 2018-04-04 253 switch (param) {
2242ddfb Manivannan Sadhasivam 2018-04-04 254 case PIN_CONFIG_BIAS_BUS_HOLD:
2242ddfb Manivannan Sadhasivam 2018-04-04 @255 *arg = OWL_PINCONF_PULL_HOLD;
2242ddfb Manivannan Sadhasivam 2018-04-04 256 break;
2242ddfb Manivannan Sadhasivam 2018-04-04 257 case PIN_CONFIG_BIAS_HIGH_IMPEDANCE:
2242ddfb Manivannan Sadhasivam 2018-04-04 @258 *arg = OWL_PINCONF_PULL_HIZ;
2242ddfb Manivannan Sadhasivam 2018-04-04 259 break;
2242ddfb Manivannan Sadhasivam 2018-04-04 260 case PIN_CONFIG_BIAS_PULL_DOWN:
2242ddfb Manivannan Sadhasivam 2018-04-04 @261 *arg = OWL_PINCONF_PULL_DOWN;
2242ddfb Manivannan Sadhasivam 2018-04-04 262 break;
2242ddfb Manivannan Sadhasivam 2018-04-04 263 case PIN_CONFIG_BIAS_PULL_UP:
2242ddfb Manivannan Sadhasivam 2018-04-04 @264 *arg = OWL_PINCONF_PULL_UP;
2242ddfb Manivannan Sadhasivam 2018-04-04 265 break;
2242ddfb Manivannan Sadhasivam 2018-04-04 266 case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
2242ddfb Manivannan Sadhasivam 2018-04-04 267 *arg = (*arg >= 1 ? 1 : 0);
2242ddfb Manivannan Sadhasivam 2018-04-04 268 break;
2242ddfb Manivannan Sadhasivam 2018-04-04 269 default:
2242ddfb Manivannan Sadhasivam 2018-04-04 270 return -ENOTSUPP;
2242ddfb Manivannan Sadhasivam 2018-04-04 271 }
2242ddfb Manivannan Sadhasivam 2018-04-04 272
2242ddfb Manivannan Sadhasivam 2018-04-04 273 return 0;
2242ddfb Manivannan Sadhasivam 2018-04-04 274 }
2242ddfb Manivannan Sadhasivam 2018-04-04 275 :::::: The code at line 255 was first introduced by commit
:::::: 2242ddfbf4d699b58d12467bbebae167d7563700 pinctrl: actions: Add Actions S900 pinctrl driver
:::::: TO: Manivannan Sadhasivam <[email protected]> :::::: CC: Linus Walleij <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 54284 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180730/2b0b1bcd/attachment-0001.gz>
PATCH v2 2/5 pinctrl: actions: define pad control configurtion to SoC specific
In reply to Saravanan Sekarpad control for s900 and s700 are differs in number of
pull control configuraions
s900 has 4 pull controls - high impedence, pull up, pull down, repeater s700, s500 has 2 pull controls - pull up and pull down
so pad control configuration has to SoC specific, moved out from pinctrl common to s700, s900 specific.
--- drivers/pinctrl/actions/pinctrl-owl.c | 64 ++++--------------------- drivers/pinctrl/actions/pinctrl-owl.h | 6 +++ drivers/pinctrl/actions/pinctrl-s900.c | 66 +++++++++++++++++++++++++- 3 files changed, 79 insertions(+), 57 deletions(-)
drivers/pinctrl/actions/pinctrl-owl.c +8 -56
@@ -246,60 +246,6 @@ static int owl_pad_pinconf_reg(const struct owl_padinfo *info,return 0 ; } -static int owl_pad_pinconf_arg2val (const struct owl_padinfo *info, -unsigned int param, -u32 *arg) -{ -switch (param) { -case PIN_CONFIG_BIAS_BUS_HOLD : - *arg =OWL_PINCONF_PULL_HOLD ; -break ; -case PIN_CONFIG_BIAS_HIGH_IMPEDANCE : - *arg =OWL_PINCONF_PULL_HIZ ; -break ; -case PIN_CONFIG_BIAS_PULL_DOWN : - *arg =OWL_PINCONF_PULL_DOWN ; -break ; -case PIN_CONFIG_BIAS_PULL_UP : - *arg =OWL_PINCONF_PULL_UP ; -break ; -case PIN_CONFIG_INPUT_SCHMITT_ENABLE : - *arg = (*arg >=1 ?1 :0 ); -break ; -default : -return -ENOTSUPP ; - } - -return 0 ; -} - -static int owl_pad_pinconf_val2arg (const struct owl_padinfo *padinfo, -unsigned int param, -u32 *arg) -{ -switch (param) { -case PIN_CONFIG_BIAS_BUS_HOLD : - *arg = *arg ==OWL_PINCONF_PULL_HOLD ; -break ; -case PIN_CONFIG_BIAS_HIGH_IMPEDANCE : - *arg = *arg ==OWL_PINCONF_PULL_HIZ ; -break ; -case PIN_CONFIG_BIAS_PULL_DOWN : - *arg = *arg ==OWL_PINCONF_PULL_DOWN ; -break ; -case PIN_CONFIG_BIAS_PULL_UP : - *arg = *arg ==OWL_PINCONF_PULL_UP ; -break ; -case PIN_CONFIG_INPUT_SCHMITT_ENABLE : - *arg = *arg ==1 ; -break ; -default : -return -ENOTSUPP ; - } - -return 0 ; -} -static int owl_pin_config_get (struct pinctrl_dev *pctrldev,unsigned int pin,unsigned long *config)
@@ -318,7 +264,10 @@ static int owl_pin_config_get(struct pinctrl_dev *pctrldev, arg =owl_read_field (pctrl, reg, bit, width); - ret =owl_pad_pinconf_val2arg (info, param, &arg); +if (!pctrl->soc->padctl_val2arg) +return -ENOTSUPP ; + + ret = pctrl->soc->padctl_val2arg (info, param, &arg);if (ret)return ret;
@@ -349,7 +298,10 @@ static int owl_pin_config_set(struct pinctrl_dev *pctrldev,if (ret)return ret; - ret =owl_pad_pinconf_arg2val (info, param, &arg); +if (!pctrl->soc->padctl_arg2val) +return -ENOTSUPP ; + + ret = pctrl->soc->padctl_arg2val (info, param, &arg);if (ret)return ret;
drivers/pinctrl/actions/pinctrl-owl.h +6 -0
@@ -298,6 +298,12 @@ struct owl_pinctrl_soc_data {unsigned int ngpios;const struct owl_gpio_port *ports;unsigned int nports; +int (*padctl_val2arg)(const struct owl_padinfo *padinfo, +unsigned int param, +u32 *arg); +int (*padctl_arg2val)(const struct owl_padinfo *info, +unsigned int param, +u32 *arg); }; int owl_pinctrl_probe(struct platform_device *pdev,
drivers/pinctrl/actions/pinctrl-s900.c +65 -1
84 lines not on this page · raw message
Signature · 1 line
2.18.0
PATCH v2 3/5 dt-bindings: pinctrl: Add bindings for Actions Semi S700 SoC
In reply to Saravanan SekarAdd pinctrl and pio bindings for Actions Semi S700 SoC.
--- .../bindings/pinctrl/actions,s700-pinctrl.txt | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/actions,s700-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/actions,s700-pinctrl.txt new file +170 -0
@@ -0,0 +1,170 @@ +Actions Semi S700 Pin Controller + +This binding describes the pin controller found in the S700 SoC. + +Required Properties: + +- compatible: Should be "actions,s700-pinctrl" +- reg: Should contain the register base address and size of + the pin controller. +- clocks: phandle of the clock feeding the pin controller +- gpio-controller: Marks the device node as a GPIO controller. +- gpio-ranges: Specifies the mapping between gpio controller and + pin-controller pins. +- #gpio-cells: Should be two. The first cell is the gpio pin number + and the second cell is used for optional parameters. +- interrupt-controller: Marks the device node as an interrupt controller. +- #interrupt-cells: Specifies the number of cells needed to encode an + interrupt. Shall be set to 2. The first cell + defines the interrupt number, the second encodes + the trigger flags described in + bindings/interrupt-controller/interrupts.txt +- interrupts: The interrupt outputs from the controller. There is one GPIO + interrupt per GPIO bank. The number of interrupts listed depends + on the number of GPIO banks on the SoC. The interrupts must be + ordered by bank, starting with bank 0. + +Please refer to pinctrl-bindings.txt in this directory for details of the +common pinctrl bindings used by client devices, including the meaning of the +phrase "pin configuration node". + +The pin configuration nodes act as a container for an arbitrary number of +subnodes. Each of these subnodes represents some desired configuration for a +pin, a group, or a list of pins or groups. This configuration can include the +mux function to select on those group(s), and various pin configuration +parameters, such as pull-up, drive strength, etc. + +PIN CONFIGURATION NODES: + +The name of each subnode is not important; all subnodes should be enumerated +and processed purely based on their content. + +Each subnode only affects those parameters that are explicitly listed. In +other words, a subnode that lists a mux function but no pin configuration +parameters implies no information about any pin configuration parameters. +Similarly, a pin subnode that describes a pullup parameter implies no +information about e.g. the mux function. + +Pinmux functions are available only for the pin groups while pinconf +parameters are available for both pin groups and individual pins. + +The following generic properties as defined in pinctrl-bindings.txt are valid +to specify in a pin configuration subnode: + +Required Properties: + +- pins: An array of strings, each string containing the name of a pin. + These pins are used for selecting the pull control and schmitt + trigger parameters. The following are the list of pins + available: + + eth_txd0, eth_txd1, eth_txd2, eth_txd3, eth_txen, eth_rxer, + eth_crs_dv, eth_rxd1, eth_rxd0, eth_rxd2, eth_rxd3, eth_ref_clk, + eth_mdc, eth_mdio, sirq0, sirq1, sirq2, i2s_d0, i2s_bclk0, + i2s_lrclk0, i2s_mclk0, i2s_d1, i2s_bclk1, i2s_lrclk1, i2s_mclk1, + pcm1_in, pcm1_clk, pcm1_sync, pcm1_out, ks_in0, ks_in1, ks_in2, + ks_in3, ks_out0, ks_out1, ks_out2, lvds_oep, lvds_oen, lvds_odp, + lvds_odn, lvds_ocp, lvds_ocn, lvds_obp, lvds_obn, lvds_oap, + lvds_oan, lvds_eep, lvds_een, lvds_edp, lvds_edn, lvds_ecp, + lvds_ecn, lvds_ebp, lvds_ebn, lvds_eap, lvds_ean, lcd0_d18, + lcd0_d2, dsi_dp3, dsi_dn3, dsi_dp1, dsi_dn1, dsi_cp, dsi_cn, + dsi_dp0, dsi_dn0, dsi_dp2, dsi_dn2, sd0_d0, sd0_d1, sd0_d2, + sd0_d3, sd1_d0, sd1_d1, sd1_d2, sd1_d3, sd0_cmd, sd0_clk, + sd1_cmd, sd1_clk, spi0_ss, spi0_miso, uart0_rx, uart0_tx, + uart2_rx, uart2_tx, uart2_rtsb, uart2_ctsb, uart3_rx, uart3_tx, + uart3_rtsb, uart3_ctsb, i2c0_sclk, i2c0_sdata, i2c1_sclk, + i2c1_sdata, i2c2_sdata, csi_dn0, csi_dp0, csi_dn1, csi_dp1, + csi_cn, csi_cp, csi_dn2, csi_dp2, csi_dn3, csi_dp3, + sensor0_pclk, sensor0_ckout, dnand_d0, dnand_d1, dnand_d2, + dnand_d3, dnand_d4, dnand_d5, dnand_d6, dnand_d7, dnand_wrb, + dnand_rdb, dnand_rdbn, dnand_dqs, dnand_dqsn, dnand_rb0, + dnand_ale, dnand_cle, dnand_ceb0, dnand_ceb1, dnand_ceb2, + dnand_ceb3, porb, clko_25m, bsel, pkg0, pkg1, pkg2, pkg3 + +- groups: An array of strings, each string containing the name of a pin + group. These pin groups are used for selecting the pinmux + functions. + rgmii_txd23_mfp, rgmii_rxd2_mfp, rgmii_rxd3_mfp, lcd0_d18_mfp, + rgmii_txd01_mfp, rgmii_txd0_mfp, rgmii_txd1_mfp, rgmii_txen_mfp, + rgmii_rxen_mfp, rgmii_rxd1_mfp, rgmii_rxd0_mfp, rgmii_ref_clk_mfp, + i2s_d0_mfp, i2s_pcm1_mfp, i2s0_pcm0_mfp, i2s1_pcm0_mfp, + i2s_d1_mfp, ks_in2_mfp, ks_in1_mfp, ks_in0_mfp, ks_in3_mfp, + ks_out0_mfp, ks_out1_mfp, ks_out2_mfp, lvds_o_pn_mfp, dsi_dn0_mfp, + dsi_dp2_mfp, lcd0_d2_mfp, dsi_dp3_mfp, dsi_dn3_mfp, dsi_dp0_mfp, + lvds_ee_pn_mfp, uart2_rx_tx_mfp, spi0_i2c_pcm_mfp, dsi_dnp1_cp_d2_mfp, + dsi_dnp1_cp_d17_mfp, lvds_e_pn_mfp, dsi_dn2_mfp, uart2_rtsb_mfp, + uart2_ctsb_mfp, uart3_rtsb_mfp, uart3_ctsb_mfp, sd0_d0_mfp, sd0_d1_mfp, + sd0_d2_d3_mfp, sd1_d0_d3_mfp, sd0_cmd_mfp, sd0_clk_mfp, sd1_cmd_mfp, + uart0_rx_mfp, clko_25m_mfp, csi_cn_cp_mfp, sens0_ckout_mfp, uart0_tx_mfp, + i2c0_mfp, csi_dn_dp_mfp, sen0_pclk_mfp, pcm1_in_mfp, pcm1_clk_mfp, + pcm1_sync_mfp, pcm1_out_mfp, dnand_data_wr_mfp, dnand_acle_ce0_mfp, + nand_ceb2_mfp, nand_ceb3_mfp + + These pin groups are used for selecting the drive strength + parameters. + + sirq_drv, rgmii_txd23_drv, rgmii_rxd23_drv, rgmii_txd01_txen_drv, + rgmii_rxer_drv, rgmii_crs_drv, rgmii_rxd10_drv, rgmii_ref_clk_drv, + smi_mdc_mdio_drv, i2s_d0_drv, i2s_bclk0_drv, i2s3_drv, i2s13_drv, + pcm1_drv, ks_in_drv, ks_out_drv, lvds_all_drv, lcd_d18_d2_drv, + dsi_all_drv, sd0_d0_d3_drv, sd0_cmd_drv, sd0_clk_drv, spi0_all_drv, + uart0_rx_drv, uart0_tx_drv, uart2_all_drv, i2c0_all_drv, i2c12_all_drv, + sens0_pclk_drv, sens0_ckout_drv, uart3_all_drv + +- function: An array of strings, each string containing the name of the + pinmux functions. These functions can only be selected by + the corresponding pin groups. The following are the list of + pinmux functions available: + + nor, eth_rgmii, eth_sgmii, spi0, spi1, spi2, spi3, seNs0, sens1, + uart0, uart1, uart2, uart3, uart4, uart5, uart6, i2s0, i2s1, + pcm1, pcm0, ks, jtag, pwm0, pwm1, pwm2, pwm3, pwm4, pwm5, p0, + sd0, sd1, sd2, i2c0, i2c1, i2c2, i2c3, dsi, lvds, usb30, + clko_25m, mipi_csi, nand, spdif, sirq0, sirq1, sirq2, bt, lcd0 + +Optional Properties: + +- bias-pull-down: No arguments. The specified pins should be configured as + pull down. +- bias-pull-up: No arguments. The specified pins should be configured as + pull up. +- input-schmitt-enable: No arguments: Enable schmitt trigger for the specified + pins +- input-schmitt-disable: No arguments: Disable schmitt trigger for the specified + pins +- drive-strength: Integer. Selects the drive strength for the specified + pins in mA. + Valid values are: + <2> + <4> + <8> + <12> + +Example: + + pinctrl: pinctrl at e01b0000 { + compatible = "actions,s700-pinctrl"; + reg = <0x0 0xe01b0000 0x0 0x1000>; + clocks = <&cmu CLK_GPIO>; + gpio-controller; + gpio-ranges = <&pinctrl 0 0 136>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH> + + uart3-default: uart3-default { + pinmux { + groups = "uart3_rtsb_mfp", "uart3_ctsb_mfp"; + function = "uart3"; + }; + pinconf { + groups = "uart3_all_drv"; + drive-strength = <2>; + }; + }; + };
Signature · 1 line
2.18.0
PATCH v2 4/5 pinctrl: actions: Add Actions Semi S700 pinctrl driver
In reply to Saravanan SekarAdd pinctrl driver for Actions Semi S700 SoC. The driver supports pinctrl, pinmux and pinconf functionalities through a range of registers common to both gpio driver and pinctrl driver.
--- drivers/pinctrl/actions/Kconfig | 6 + drivers/pinctrl/actions/Makefile | 1 + drivers/pinctrl/actions/pinctrl-owl.c | 7 +- drivers/pinctrl/actions/pinctrl-s700.c | 1925 ++++++++++++++++++++++++ 4 files changed, 1936 insertions(+), 3 deletions(-) create mode 100644 drivers/pinctrl/actions/pinctrl-s700.c
drivers/pinctrl/actions/Kconfig +6 -0
@@ -9,6 +9,12 @@ config PINCTRL_OWL help Say Y here to enable Actions Semi OWL pinctrl driver +config PINCTRL_S700 + bool "Actions Semi S700 pinctrl driver" + depends on PINCTRL_OWL + help + Say Y here to enable Actions Semi S700 pinctrl driver + config PINCTRL_S900 bool "Actions Semi S900 pinctrl driver" depends on PINCTRL_OWL
drivers/pinctrl/actions/Makefile +1 -0
@@ -1,2 +1,3 @@ obj-$(CONFIG_PINCTRL_OWL) += pinctrl-owl.o +obj-$(CONFIG_PINCTRL_S700) += pinctrl-s700.o obj-$(CONFIG_PINCTRL_S900) += pinctrl-s900.o
drivers/pinctrl/actions/pinctrl-owl.c +4 -3
@@ -739,7 +739,7 @@ static void owl_gpio_irq_mask(struct irq_data *data) val =readl_relaxed (gpio_base + port->intc_msk);if (val ==0 )owl_gpio_update_reg (gpio_base + port->intc_ctl, -OWL_GPIO_CTLR_ENABLE , false); +OWL_GPIO_CTLR_ENABLE + port->shared_ctl_offset *5 , false);raw_spin_unlock_irqrestore (&pctrl->lock, flags); }
@@ -763,7 +763,8 @@ static void owl_gpio_irq_unmask(struct irq_data *data)/* enable port interrupt */ value =readl_relaxed (gpio_base + port->intc_ctl); - value |=BIT (OWL_GPIO_CTLR_ENABLE ) |BIT (OWL_GPIO_CTLR_SAMPLE_CLK_24M ); + value |= ((BIT (OWL_GPIO_CTLR_ENABLE ) |BIT (OWL_GPIO_CTLR_SAMPLE_CLK_24M )) + << port->shared_ctl_offset *5 );writel_relaxed (value, gpio_base + port->intc_ctl);/* enable GPIO interrupt */
@@ -801,7 +802,7 @@ static void owl_gpio_irq_ack(struct irq_data *data)raw_spin_lock_irqsave (&pctrl->lock, flags);owl_gpio_update_reg (gpio_base + port->intc_ctl, -OWL_GPIO_CTLR_PENDING , true); +OWL_GPIO_CTLR_PENDING + port->shared_ctl_offset *5 , true);raw_spin_unlock_irqrestore (&pctrl->lock, flags); }
drivers/pinctrl/actions/pinctrl-s700.c new file +1925 -0
1,925 lines not on this page · raw message
Signature · 1 line
2.18.0
PATCH v2 5/5 arm64: dts: actions: Add pinctrl node for Actions Semi S700
In reply to Saravanan SekarAdd pinctrl nodes for Actions Semi S700 SoC
--- arch/arm64/boot/dts/actions/s700.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/actions/s700.dtsi +16 -0
@@ -165,5 +165,21 @@ interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "timer1"; }; + + pinctrl: pinctrl at e01b0000 { + compatible = "actions,s700-pinctrl"; + reg = <0x0 0xe01b0000 0x0 0x1000>; + clocks = <&cmu CLK_GPIO>; + gpio-controller; + gpio-ranges = <&pinctrl 0 0 136>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; + }; }; };
Signature · 1 line
2.18.0
kbuild test robot
build botRe: [PATCH v2 5/5] arm64: dts: actions: Add pinctrl node for Actions Semi S700
Thank you for the patch! Yet something to improve:
Hi Saravanan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pinctrl/devel]
[also build test ERROR on next-20180727]
[cannot apply to v4.18-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Saravanan-Sekar/Add-Actions-Semi-S700-pinctrl-support/20180730-022827 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel config: arm64-defconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=arm64
All errors (new ones prefixed by >>):
>> Error: arch/arm64/boot/dts/actions/s700.dtsi:172.19-20 syntax error
FATAL ERROR: Unable to parse input tree
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 38745 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180730/c1d6c49b/attachment-0001.gz>
v3 cover Add Actions Semi S700 pinctrl support
In reply to Saravanan SekarThis patchset adds pinctrl support for Actions Semi S700 SoC. Pinmux functions are only accessible for pin groups while pinconf parameters are available for both pin groups and individual pins.
pinctrl driver is verified using the Cubieboard7.
common functionalities from s900 is moved for all Actions Semi SoC's usage.
Common pad control configurations are moved to SoC specific
dts entry for pinctrl depends on clock driver which is still under review:
https://patchwork.kernel.org/patch/10533959/
Thanks,
Saravanan
Parthiban
Changelog in v2
- GPIO Interrupt support is added
- Device tree entry for GPIO and Interrupt configured
- GPIO and pinctrl define reorder, commit message findings fixed
depends on owl GPIO Interrupt support
https://patchwork.kernel.org/patch/10483477/
Chnagelog in v3
- Fixed 0-DAY bisectibility error
Saravanan Sekar (5):
pinctrl: actions: define constructor generic to Actions Semi SoC's
pinctrl: actions: define pad control configurtion to SoC specific
dt-bindings: pinctrl: Add bindings for Actions Semi S700 SoC
pinctrl: actions: Add Actions Semi S700 pinctrl driver
arm64: dts: actions: Add pinctrl node for Actions Semi S700
.../bindings/pinctrl/actions,s700-pinctrl.txt | 170 ++ arch/arm64/boot/dts/actions/s700.dtsi | 16 + drivers/pinctrl/actions/Kconfig | 6 + drivers/pinctrl/actions/Makefile | 1 + drivers/pinctrl/actions/pinctrl-owl.c | 71 +- drivers/pinctrl/actions/pinctrl-owl.h | 142 +- drivers/pinctrl/actions/pinctrl-s700.c | 1925 +++++++++++++++++ drivers/pinctrl/actions/pinctrl-s900.c | 205 +- 8 files changed, 2337 insertions(+), 199 deletions(-) create mode 100644 Documentation/devicetree/bindings/pinctrl/actions,s700-pinctrl.txt create mode 100644 drivers/pinctrl/actions/pinctrl-s700.c
Signature · 1 line
2.18.0
PATCH v3 1/5 pinctrl: actions: define constructor generic to Actions Semi SoC's
Move generic defines common to the Owl family out of S900 driver.
--- drivers/pinctrl/actions/pinctrl-owl.h | 131 +++++++++++++++++++++++ drivers/pinctrl/actions/pinctrl-s900.c | 139 ++----------------------- 2 files changed, 137 insertions(+), 133 deletions(-)
drivers/pinctrl/actions/pinctrl-owl.h +131 -0
@@ -15,6 +15,136 @@#define OWL_PINCONF_SLEW_SLOW 0#define OWL_PINCONF_SLEW_FAST 1 +#define MUX_PG (group_name, reg, shift, width) \ + { \ + .name = #group_name, \ + .pads = group_name##_pads, \ + .npads = ARRAY_SIZE(group_name##_pads), \ + .funcs = group_name##_funcs, \ + .nfuncs = ARRAY_SIZE(group_name##_funcs), \ + .mfpctl_reg = MFCTL##reg, \ + .mfpctl_shift = shift, \ + .mfpctl_width = width, \ + .drv_reg = -1, \ + .drv_shift = -1, \ + .drv_width = -1, \ + .sr_reg = -1, \ + .sr_shift = -1, \ + .sr_width = -1, \ + } + +#define DRV_PG (group_name, reg, shift, width) \ + { \ + .name = #group_name, \ + .pads = group_name##_pads, \ + .npads = ARRAY_SIZE(group_name##_pads), \ + .mfpctl_reg = -1, \ + .mfpctl_shift = -1, \ + .mfpctl_width = -1, \ + .drv_reg = PAD_DRV##reg, \ + .drv_shift = shift, \ + .drv_width = width, \ + .sr_reg = -1, \ + .sr_shift = -1, \ + .sr_width = -1, \ + } + +#define SR_PG (group_name, reg, shift, width) \ + { \ + .name = #group_name, \ + .pads = group_name##_pads, \ + .npads = ARRAY_SIZE(group_name##_pads), \ + .mfpctl_reg = -1, \ + .mfpctl_shift = -1, \ + .mfpctl_width = -1, \ + .drv_reg = -1, \ + .drv_shift = -1, \ + .drv_width = -1, \ + .sr_reg = PAD_SR##reg, \ + .sr_shift = shift, \ + .sr_width = width, \ + } + +#define FUNCTION (fname) \ + { \ + .name = #fname, \ + .groups = fname##_groups, \ + .ngroups = ARRAY_SIZE(fname##_groups), \ + } + +/* PAD PULL UP/DOWN CONFIGURES */ +#define PULLCTL_CONF (pull_reg, pull_sft, pull_wdt) \ + { \ + .reg = PAD_PULLCTL##pull_reg, \ + .shift = pull_sft, \ + .width = pull_wdt, \ + } + +#define PAD_PULLCTL_CONF (pad_name, pull_reg, pull_sft, pull_wdt) \ + struct owl_pullctl pad_name##_pullctl_conf \ + = PULLCTL_CONF(pull_reg, pull_sft, pull_wdt) + +#define ST_CONF (st_reg, st_sft, st_wdt) \ + { \ + .reg = PAD_ST##st_reg, \ + .shift = st_sft, \ + .width = st_wdt, \ + } + +#define PAD_ST_CONF (pad_name, st_reg, st_sft, st_wdt) \ + struct owl_st pad_name##_st_conf \ + = ST_CONF(st_reg, st_sft, st_wdt) + +#define PAD_INFO (name) \ + { \ + .pad = name, \ + .pullctl = NULL, \ + .st = NULL, \ + } + +#define PAD_INFO_ST (name) \ + { \ + .pad = name, \ + .pullctl = NULL, \ + .st = &name##_st_conf, \ + } + +#define PAD_INFO_PULLCTL (name) \ + { \ + .pad = name, \ + .pullctl = &name##_pullctl_conf, \ + .st = NULL, \ + } + +#define PAD_INFO_PULLCTL_ST (name) \ + { \ + .pad = name, \ + .pullctl = &name##_pullctl_conf, \ + .st = &name##_st_conf, \ + } + +#define OWL_GPIO_PORT_A 0 +#define OWL_GPIO_PORT_B 1 +#define OWL_GPIO_PORT_C 2 +#define OWL_GPIO_PORT_D 3 +#define OWL_GPIO_PORT_E 4 +#define OWL_GPIO_PORT_F 5 + +#define OWL_GPIO_PORT (port, base, count, _outen, _inen, _dat, _intc_ctl,\ + _intc_pd, _intc_msk, _intc_type, _share) \ + [OWL_GPIO_PORT_##port] = { \ + .offset = base, \ + .pins = count, \ + .outen = _outen, \ + .inen = _inen, \ + .dat = _dat, \ + .intc_ctl = _intc_ctl, \ + .intc_pd = _intc_pd, \ + .intc_msk = _intc_msk, \ + .intc_type = _intc_type, \ + .shared_ctl_offset = _share, \ + } +enum owl_pinconf_pull {OWL_PINCONF_PULL_HIZ ,OWL_PINCONF_PULL_DOWN ,
@@ -148,6 +278,7 @@ struct owl_gpio_port {unsigned int intc_pd;unsigned int intc_msk;unsigned int intc_type; +u8 shared_ctl_offset; };/**
drivers/pinctrl/actions/pinctrl-s900.c +6 -133
176 lines not on this page · raw message
Signature · 1 line
2.18.0
PATCH v3 2/5 pinctrl: actions: define pad control configurtion to SoC specific
In reply to Saravanan Sekarpad control for s900 and s700 are differs in number of
pull control configuraions
s900 has 4 pull controls - high impedence, pull up, pull down, repeater s700, s500 has 2 pull controls - pull up and pull down
so pad control configuration has to SoC specific, moved out from pinctrl common to s700, s900 specific.
--- drivers/pinctrl/actions/pinctrl-owl.c | 64 ++++--------------------- drivers/pinctrl/actions/pinctrl-owl.h | 13 +++-- drivers/pinctrl/actions/pinctrl-s900.c | 66 +++++++++++++++++++++++++- 3 files changed, 79 insertions(+), 64 deletions(-)
drivers/pinctrl/actions/pinctrl-owl.c +8 -56
@@ -246,60 +246,6 @@ static int owl_pad_pinconf_reg(const struct owl_padinfo *info,return 0 ; } -static int owl_pad_pinconf_arg2val (const struct owl_padinfo *info, -unsigned int param, -u32 *arg) -{ -switch (param) { -case PIN_CONFIG_BIAS_BUS_HOLD : - *arg =OWL_PINCONF_PULL_HOLD ; -break ; -case PIN_CONFIG_BIAS_HIGH_IMPEDANCE : - *arg =OWL_PINCONF_PULL_HIZ ; -break ; -case PIN_CONFIG_BIAS_PULL_DOWN : - *arg =OWL_PINCONF_PULL_DOWN ; -break ; -case PIN_CONFIG_BIAS_PULL_UP : - *arg =OWL_PINCONF_PULL_UP ; -break ; -case PIN_CONFIG_INPUT_SCHMITT_ENABLE : - *arg = (*arg >=1 ?1 :0 ); -break ; -default : -return -ENOTSUPP ; - } - -return 0 ; -} - -static int owl_pad_pinconf_val2arg (const struct owl_padinfo *padinfo, -unsigned int param, -u32 *arg) -{ -switch (param) { -case PIN_CONFIG_BIAS_BUS_HOLD : - *arg = *arg ==OWL_PINCONF_PULL_HOLD ; -break ; -case PIN_CONFIG_BIAS_HIGH_IMPEDANCE : - *arg = *arg ==OWL_PINCONF_PULL_HIZ ; -break ; -case PIN_CONFIG_BIAS_PULL_DOWN : - *arg = *arg ==OWL_PINCONF_PULL_DOWN ; -break ; -case PIN_CONFIG_BIAS_PULL_UP : - *arg = *arg ==OWL_PINCONF_PULL_UP ; -break ; -case PIN_CONFIG_INPUT_SCHMITT_ENABLE : - *arg = *arg ==1 ; -break ; -default : -return -ENOTSUPP ; - } - -return 0 ; -} -static int owl_pin_config_get (struct pinctrl_dev *pctrldev,unsigned int pin,unsigned long *config)
@@ -318,7 +264,10 @@ static int owl_pin_config_get(struct pinctrl_dev *pctrldev, arg =owl_read_field (pctrl, reg, bit, width); - ret =owl_pad_pinconf_val2arg (info, param, &arg); +if (!pctrl->soc->padctl_val2arg) +return -ENOTSUPP ; + + ret = pctrl->soc->padctl_val2arg (info, param, &arg);if (ret)return ret;
@@ -349,7 +298,10 @@ static int owl_pin_config_set(struct pinctrl_dev *pctrldev,if (ret)return ret; - ret =owl_pad_pinconf_arg2val (info, param, &arg); +if (!pctrl->soc->padctl_arg2val) +return -ENOTSUPP ; + + ret = pctrl->soc->padctl_arg2val (info, param, &arg);if (ret)return ret;
drivers/pinctrl/actions/pinctrl-owl.h +6 -7
@@ -145,13 +145,6 @@ .shared_ctl_offset = _share, \ } -enum owl_pinconf_pull { -OWL_PINCONF_PULL_HIZ , -OWL_PINCONF_PULL_DOWN , -OWL_PINCONF_PULL_UP , -OWL_PINCONF_PULL_HOLD , -}; -enum owl_pinconf_drv {OWL_PINCONF_DRV_2MA ,OWL_PINCONF_DRV_4MA ,
@@ -305,6 +298,12 @@ struct owl_pinctrl_soc_data {unsigned int ngpios;const struct owl_gpio_port *ports;unsigned int nports; +int (*padctl_val2arg)(const struct owl_padinfo *padinfo, +unsigned int param, +u32 *arg); +int (*padctl_arg2val)(const struct owl_padinfo *info, +unsigned int param, +u32 *arg); }; int owl_pinctrl_probe(struct platform_device *pdev,
drivers/pinctrl/actions/pinctrl-s900.c +65 -1
84 lines not on this page · raw message
Signature · 1 line
2.18.0
PATCH v3 3/5 dt-bindings: pinctrl: Add bindings for Actions Semi S700 SoC
In reply to Saravanan SekarAdd pinctrl and pio bindings for Actions Semi S700 SoC.
--- .../bindings/pinctrl/actions,s700-pinctrl.txt | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/actions,s700-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/actions,s700-pinctrl.txt new file +170 -0
@@ -0,0 +1,170 @@ +Actions Semi S700 Pin Controller + +This binding describes the pin controller found in the S700 SoC. + +Required Properties: + +- compatible: Should be "actions,s700-pinctrl" +- reg: Should contain the register base address and size of + the pin controller. +- clocks: phandle of the clock feeding the pin controller +- gpio-controller: Marks the device node as a GPIO controller. +- gpio-ranges: Specifies the mapping between gpio controller and + pin-controller pins. +- #gpio-cells: Should be two. The first cell is the gpio pin number + and the second cell is used for optional parameters. +- interrupt-controller: Marks the device node as an interrupt controller. +- #interrupt-cells: Specifies the number of cells needed to encode an + interrupt. Shall be set to 2. The first cell + defines the interrupt number, the second encodes + the trigger flags described in + bindings/interrupt-controller/interrupts.txt +- interrupts: The interrupt outputs from the controller. There is one GPIO + interrupt per GPIO bank. The number of interrupts listed depends + on the number of GPIO banks on the SoC. The interrupts must be + ordered by bank, starting with bank 0. + +Please refer to pinctrl-bindings.txt in this directory for details of the +common pinctrl bindings used by client devices, including the meaning of the +phrase "pin configuration node". + +The pin configuration nodes act as a container for an arbitrary number of +subnodes. Each of these subnodes represents some desired configuration for a +pin, a group, or a list of pins or groups. This configuration can include the +mux function to select on those group(s), and various pin configuration +parameters, such as pull-up, drive strength, etc. + +PIN CONFIGURATION NODES: + +The name of each subnode is not important; all subnodes should be enumerated +and processed purely based on their content. + +Each subnode only affects those parameters that are explicitly listed. In +other words, a subnode that lists a mux function but no pin configuration +parameters implies no information about any pin configuration parameters. +Similarly, a pin subnode that describes a pullup parameter implies no +information about e.g. the mux function. + +Pinmux functions are available only for the pin groups while pinconf +parameters are available for both pin groups and individual pins. + +The following generic properties as defined in pinctrl-bindings.txt are valid +to specify in a pin configuration subnode: + +Required Properties: + +- pins: An array of strings, each string containing the name of a pin. + These pins are used for selecting the pull control and schmitt + trigger parameters. The following are the list of pins + available: + + eth_txd0, eth_txd1, eth_txd2, eth_txd3, eth_txen, eth_rxer, + eth_crs_dv, eth_rxd1, eth_rxd0, eth_rxd2, eth_rxd3, eth_ref_clk, + eth_mdc, eth_mdio, sirq0, sirq1, sirq2, i2s_d0, i2s_bclk0, + i2s_lrclk0, i2s_mclk0, i2s_d1, i2s_bclk1, i2s_lrclk1, i2s_mclk1, + pcm1_in, pcm1_clk, pcm1_sync, pcm1_out, ks_in0, ks_in1, ks_in2, + ks_in3, ks_out0, ks_out1, ks_out2, lvds_oep, lvds_oen, lvds_odp, + lvds_odn, lvds_ocp, lvds_ocn, lvds_obp, lvds_obn, lvds_oap, + lvds_oan, lvds_eep, lvds_een, lvds_edp, lvds_edn, lvds_ecp, + lvds_ecn, lvds_ebp, lvds_ebn, lvds_eap, lvds_ean, lcd0_d18, + lcd0_d2, dsi_dp3, dsi_dn3, dsi_dp1, dsi_dn1, dsi_cp, dsi_cn, + dsi_dp0, dsi_dn0, dsi_dp2, dsi_dn2, sd0_d0, sd0_d1, sd0_d2, + sd0_d3, sd1_d0, sd1_d1, sd1_d2, sd1_d3, sd0_cmd, sd0_clk, + sd1_cmd, sd1_clk, spi0_ss, spi0_miso, uart0_rx, uart0_tx, + uart2_rx, uart2_tx, uart2_rtsb, uart2_ctsb, uart3_rx, uart3_tx, + uart3_rtsb, uart3_ctsb, i2c0_sclk, i2c0_sdata, i2c1_sclk, + i2c1_sdata, i2c2_sdata, csi_dn0, csi_dp0, csi_dn1, csi_dp1, + csi_cn, csi_cp, csi_dn2, csi_dp2, csi_dn3, csi_dp3, + sensor0_pclk, sensor0_ckout, dnand_d0, dnand_d1, dnand_d2, + dnand_d3, dnand_d4, dnand_d5, dnand_d6, dnand_d7, dnand_wrb, + dnand_rdb, dnand_rdbn, dnand_dqs, dnand_dqsn, dnand_rb0, + dnand_ale, dnand_cle, dnand_ceb0, dnand_ceb1, dnand_ceb2, + dnand_ceb3, porb, clko_25m, bsel, pkg0, pkg1, pkg2, pkg3 + +- groups: An array of strings, each string containing the name of a pin + group. These pin groups are used for selecting the pinmux + functions. + rgmii_txd23_mfp, rgmii_rxd2_mfp, rgmii_rxd3_mfp, lcd0_d18_mfp, + rgmii_txd01_mfp, rgmii_txd0_mfp, rgmii_txd1_mfp, rgmii_txen_mfp, + rgmii_rxen_mfp, rgmii_rxd1_mfp, rgmii_rxd0_mfp, rgmii_ref_clk_mfp, + i2s_d0_mfp, i2s_pcm1_mfp, i2s0_pcm0_mfp, i2s1_pcm0_mfp, + i2s_d1_mfp, ks_in2_mfp, ks_in1_mfp, ks_in0_mfp, ks_in3_mfp, + ks_out0_mfp, ks_out1_mfp, ks_out2_mfp, lvds_o_pn_mfp, dsi_dn0_mfp, + dsi_dp2_mfp, lcd0_d2_mfp, dsi_dp3_mfp, dsi_dn3_mfp, dsi_dp0_mfp, + lvds_ee_pn_mfp, uart2_rx_tx_mfp, spi0_i2c_pcm_mfp, dsi_dnp1_cp_d2_mfp, + dsi_dnp1_cp_d17_mfp, lvds_e_pn_mfp, dsi_dn2_mfp, uart2_rtsb_mfp, + uart2_ctsb_mfp, uart3_rtsb_mfp, uart3_ctsb_mfp, sd0_d0_mfp, sd0_d1_mfp, + sd0_d2_d3_mfp, sd1_d0_d3_mfp, sd0_cmd_mfp, sd0_clk_mfp, sd1_cmd_mfp, + uart0_rx_mfp, clko_25m_mfp, csi_cn_cp_mfp, sens0_ckout_mfp, uart0_tx_mfp, + i2c0_mfp, csi_dn_dp_mfp, sen0_pclk_mfp, pcm1_in_mfp, pcm1_clk_mfp, + pcm1_sync_mfp, pcm1_out_mfp, dnand_data_wr_mfp, dnand_acle_ce0_mfp, + nand_ceb2_mfp, nand_ceb3_mfp + + These pin groups are used for selecting the drive strength + parameters. + + sirq_drv, rgmii_txd23_drv, rgmii_rxd23_drv, rgmii_txd01_txen_drv, + rgmii_rxer_drv, rgmii_crs_drv, rgmii_rxd10_drv, rgmii_ref_clk_drv, + smi_mdc_mdio_drv, i2s_d0_drv, i2s_bclk0_drv, i2s3_drv, i2s13_drv, + pcm1_drv, ks_in_drv, ks_out_drv, lvds_all_drv, lcd_d18_d2_drv, + dsi_all_drv, sd0_d0_d3_drv, sd0_cmd_drv, sd0_clk_drv, spi0_all_drv, + uart0_rx_drv, uart0_tx_drv, uart2_all_drv, i2c0_all_drv, i2c12_all_drv, + sens0_pclk_drv, sens0_ckout_drv, uart3_all_drv + +- function: An array of strings, each string containing the name of the + pinmux functions. These functions can only be selected by + the corresponding pin groups. The following are the list of + pinmux functions available: + + nor, eth_rgmii, eth_sgmii, spi0, spi1, spi2, spi3, seNs0, sens1, + uart0, uart1, uart2, uart3, uart4, uart5, uart6, i2s0, i2s1, + pcm1, pcm0, ks, jtag, pwm0, pwm1, pwm2, pwm3, pwm4, pwm5, p0, + sd0, sd1, sd2, i2c0, i2c1, i2c2, i2c3, dsi, lvds, usb30, + clko_25m, mipi_csi, nand, spdif, sirq0, sirq1, sirq2, bt, lcd0 + +Optional Properties: + +- bias-pull-down: No arguments. The specified pins should be configured as + pull down. +- bias-pull-up: No arguments. The specified pins should be configured as + pull up. +- input-schmitt-enable: No arguments: Enable schmitt trigger for the specified + pins +- input-schmitt-disable: No arguments: Disable schmitt trigger for the specified + pins +- drive-strength: Integer. Selects the drive strength for the specified + pins in mA. + Valid values are: + <2> + <4> + <8> + <12> + +Example: + + pinctrl: pinctrl at e01b0000 { + compatible = "actions,s700-pinctrl"; + reg = <0x0 0xe01b0000 0x0 0x1000>; + clocks = <&cmu CLK_GPIO>; + gpio-controller; + gpio-ranges = <&pinctrl 0 0 136>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH> + + uart3-default: uart3-default { + pinmux { + groups = "uart3_rtsb_mfp", "uart3_ctsb_mfp"; + function = "uart3"; + }; + pinconf { + groups = "uart3_all_drv"; + drive-strength = <2>; + }; + }; + };
Signature · 1 line
2.18.0
Re: [PATCH v3 3/5] dt-bindings: pinctrl: Add bindings for Actions Semi S700 SoC
Quoted 8 lines · Saravanan Sekar
Add pinctrl and pio bindings for Actions Semi S700 SoC.
Signed-off-by Parthiban Nallathambi <[email protected]>Signed-off-by Saravanan Sekar <[email protected]>--- .../bindings/pinctrl/actions,s700-pinctrl.txt | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/actions,s700-pinctrl.txt
PATCH v3 4/5 pinctrl: actions: Add Actions Semi S700 pinctrl driver
In reply to Saravanan SekarAdd pinctrl driver for Actions Semi S700 SoC. The driver supports pinctrl, pinmux and pinconf functionalities through a range of registers common to both gpio driver and pinctrl driver.
--- drivers/pinctrl/actions/Kconfig | 6 + drivers/pinctrl/actions/Makefile | 1 + drivers/pinctrl/actions/pinctrl-owl.c | 7 +- drivers/pinctrl/actions/pinctrl-s700.c | 1925 ++++++++++++++++++++++++ 4 files changed, 1936 insertions(+), 3 deletions(-) create mode 100644 drivers/pinctrl/actions/pinctrl-s700.c
drivers/pinctrl/actions/Kconfig +6 -0
@@ -9,6 +9,12 @@ config PINCTRL_OWL help Say Y here to enable Actions Semi OWL pinctrl driver +config PINCTRL_S700 + bool "Actions Semi S700 pinctrl driver" + depends on PINCTRL_OWL + help + Say Y here to enable Actions Semi S700 pinctrl driver + config PINCTRL_S900 bool "Actions Semi S900 pinctrl driver" depends on PINCTRL_OWL
drivers/pinctrl/actions/Makefile +1 -0
@@ -1,2 +1,3 @@ obj-$(CONFIG_PINCTRL_OWL) += pinctrl-owl.o +obj-$(CONFIG_PINCTRL_S700) += pinctrl-s700.o obj-$(CONFIG_PINCTRL_S900) += pinctrl-s900.o
drivers/pinctrl/actions/pinctrl-owl.c +4 -3
@@ -739,7 +739,7 @@ static void owl_gpio_irq_mask(struct irq_data *data) val =readl_relaxed (gpio_base + port->intc_msk);if (val ==0 )owl_gpio_update_reg (gpio_base + port->intc_ctl, -OWL_GPIO_CTLR_ENABLE , false); +OWL_GPIO_CTLR_ENABLE + port->shared_ctl_offset *5 , false);raw_spin_unlock_irqrestore (&pctrl->lock, flags); }
@@ -763,7 +763,8 @@ static void owl_gpio_irq_unmask(struct irq_data *data)/* enable port interrupt */ value =readl_relaxed (gpio_base + port->intc_ctl); - value |=BIT (OWL_GPIO_CTLR_ENABLE ) |BIT (OWL_GPIO_CTLR_SAMPLE_CLK_24M ); + value |= ((BIT (OWL_GPIO_CTLR_ENABLE ) |BIT (OWL_GPIO_CTLR_SAMPLE_CLK_24M )) + << port->shared_ctl_offset *5 );writel_relaxed (value, gpio_base + port->intc_ctl);/* enable GPIO interrupt */
@@ -801,7 +802,7 @@ static void owl_gpio_irq_ack(struct irq_data *data)raw_spin_lock_irqsave (&pctrl->lock, flags);owl_gpio_update_reg (gpio_base + port->intc_ctl, -OWL_GPIO_CTLR_PENDING , true); +OWL_GPIO_CTLR_PENDING + port->shared_ctl_offset *5 , true);raw_spin_unlock_irqrestore (&pctrl->lock, flags); }
drivers/pinctrl/actions/pinctrl-s700.c new file +1925 -0
1,925 lines not on this page · raw message
Signature · 1 line
2.18.0
kbuild test robot
build botRe: [PATCH v3 4/5] pinctrl: actions: Add Actions Semi S700 pinctrl driver
Thank you for the patch! Perhaps something to improve:
Hi Saravanan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on pinctrl/devel]
[also build test WARNING on next-20180727]
[cannot apply to v4.18-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Saravanan-Sekar/Add-Actions-Semi-S700-pinctrl-support/20180730-040252 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/pinctrl/actions/pinctrl-s700.c:228:31: sparse: symbol 's700_pads' was not declared. Should it be static? >> drivers/pinctrl/actions/pinctrl-s700.c:1552:30: sparse: symbol 's700_functions' was not declared. Should it be static? >> drivers/pinctrl/actions/pinctrl-s700.c:1700:20: sparse: symbol 's700_padinfo' was not declared. Should it be static?
drivers/pinctrl/actions/pinctrl-s700.c:1589:10: sparse: Initializer entry defined twice
drivers/pinctrl/actions/pinctrl-s700.c:1594:10: also defined here
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build bot[RFC PATCH] pinctrl: actions: s700_pads[] can be static
In reply to Saravanan SekarFixes: e96a1c4b279a ("pinctrl: actions: Add Actions Semi S700 pinctrl driver")
--- pinctrl-s700.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pinctrl/actions/pinctrl-s700.c +3 -3
@@ -225,7 +225,7 @@#define NUM_PADS (_LASTPAD - _FIRSTPAD + 1)/* Pad names for the pinmux subsystem */ -const struct pinctrl_pin_desc s700_pads[] = { +static const struct pinctrl_pin_desc s700_pads[] = {PINCTRL_PIN (ETH_TXD0 ,"eth_txd0" ),PINCTRL_PIN (ETH_TXD1 ,"eth_txd1" ),PINCTRL_PIN (ETH_TXD2 ,"eth_txd2" ),
@@ -1549,7 +1549,7 @@ static const char * const sirq2_groups[] = { "sirq2_dummy", }; -const struct owl_pinmux_func s700_functions[] = { +static const struct owl_pinmux_func s700_functions[] = { [S700_MUX_NOR ] =FUNCTION (nor), [S700_MUX_ETH_RGMII ] =FUNCTION (eth_rmii), [S700_MUX_ETH_SGMII ] =FUNCTION (eth_smii),
@@ -1697,7 +1697,7 @@ static PAD_PULLCTL_CONF(I2C2_SCLK, 2, 7, 1);/********PAD INFOS*****************************/ /* Pad info table for the pinmux subsystem */ -struct owl_padinfo s700_padinfo[NUM_PADS ] = { +static struct owl_padinfo s700_padinfo[NUM_PADS ] = { [ETH_TXD0 ] =PAD_INFO_ST (ETH_TXD0 ), [ETH_TXD1 ] =PAD_INFO_ST (ETH_TXD1 ), [ETH_TXEN ] =PAD_INFO_ST (ETH_TXEN ),
PATCH v3 5/5 arm64: dts: actions: Add pinctrl node for Actions Semi S700
In reply to Saravanan SekarAdd pinctrl nodes for Actions Semi S700 SoC
--- arch/arm64/boot/dts/actions/s700.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/actions/s700.dtsi +16 -0
@@ -165,5 +165,21 @@ interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "timer1"; }; + + pinctrl: pinctrl at e01b0000 { + compatible = "actions,s700-pinctrl"; + reg = <0x0 0xe01b0000 0x0 0x1000>; + clocks = <&cmu CLK_GPIO>; + gpio-controller; + gpio-ranges = <&pinctrl 0 0 136>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; + }; }; };
Signature · 1 line
2.18.0
kbuild test robot
build botRe: [PATCH v3 5/5] arm64: dts: actions: Add pinctrl node for Actions Semi S700
Thank you for the patch! Yet something to improve:
Hi Saravanan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pinctrl/devel]
[also build test ERROR on next-20180727]
[cannot apply to v4.18-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Saravanan-Sekar/Add-Actions-Semi-S700-pinctrl-support/20180730-040252 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel config: arm64-allmodconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=arm64
All errors (new ones prefixed by >>):
Error: arch/arm64/boot/dts/actions/s700.dtsi:172.19-20 syntax error
>> FATAL ERROR: Unable to parse input tree
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 60370 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180730/8054baf1/attachment-0001.gz>