pinctrl: aspeed: Implement remaining pins
Subsystems (5)
v4 cover pinctrl: aspeed: Implement remaining pins
Hi Linus,
This is v4 of the series implementing the remainder of the pinmux tables for the AST2400 and AST2500 SoCs. v3 of the series can be found here:
https://lkml.org/lkml/2016/12/5/847
Cheers,
Andrew
Changes since v3:
* Add a patch fixing the AST2400 SCU compatible strings in the Aspeed pinctrl bindings. They are mentioned to define the expectations on the pinctrl node's parent and also in the examples to illustrate the relationship.
* Rework the g5 example bindings in patch 2/5 to reflect the LPC/LHC bindings[1][2], and fix the SCU compatible string.
[1] https://lkml.org/lkml/2016/12/20/63
[2] https://lkml.org/lkml/2016/12/20/62
Significant changes since v2:
* The fix for touching bit SCU90[6] has been applied, so the patch has been dropped.
* The MFD devicetree bindings patches have been split out into their own
series: https://lkml.org/lkml/2016/12/5/835
* Rework the "Read and write bits in LPC and GFX controllers" patch so that the changes are backwards compatible with existing devicetrees. This will lead to limited functionality, but no more limited than what systems with those devicetrees already experience.
* A fix for the kerneldoc return value descriptions
Significant changes since v1:
* Fixes from v1 have been applied, so have been dropped for v2
* A new fix has appeared, "pinctrl-aspeed-g5: Never set SCU90[6]", as noted above
* New bindings documents for the SoC Display and LPC Host Controllers, driven by the patch "pinctrl: aspeed: Read and write bits in LPCHC and GFX controllers"
* The v1 patch "pinctrl: aspeed: Enable capture of off-SCU pinmux state" has been significantly reworked and is now titled "pinctrl: aspeed: Read and write bits in LPCHC and GFX controllers"
Andrew Jeffery (5):
pinctrl: aspeed: dt: Fix compatibles for the System Control Unit
pinctrl: aspeed: Read and write bits in LPC and GFX controllers
pinctrl: aspeed-g4: Add mux configuration for all pins
pinctrl: aspeed-g5: Add mux configuration for all pins
pinctrl: aspeed: Fix kerneldoc return descriptions
.../devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 127 +- drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 1115 +++++++++++++- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 1524 +++++++++++++++++++- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 165 ++- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 33 +- 5 files changed, 2835 insertions(+), 129 deletions(-)
Signature · 1 line
2.9.3
PATCH v4 1/5 pinctrl: aspeed: dt: Fix compatibles for the System Control Unit
Reference the SoC-specific compatible string in the examples as required.
--- Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt +8 -3
@@ -11,9 +11,14 @@ Required properties: "aspeed,ast2500-pinctrl" "aspeed,g5-pinctrl" -The pin controller node should be a child of a syscon node with the required +The pin controller node should be the child of a syscon node with the required property: -- compatible: "syscon", "simple-mfd" + +- compatible : Should be one of the following: + "aspeed,ast2400-scu", "syscon", "simple-mfd" + "aspeed,g4-scu", "syscon", "simple-mfd" + "aspeed,ast2500-scu", "syscon", "simple-mfd" + "aspeed,g5-scu", "syscon", "simple-mfd" Refer to the the bindings described in Documentation/devicetree/bindings/mfd/syscon.txt
@@ -50,7 +55,7 @@ TIMER7 TIMER8 VGABIOSROM Examples: syscon: scu@1e6e2000 { - compatible = "syscon", "simple-mfd"; + compatible = "aspeed,ast2400-scu", "syscon", "simple-mfd"; reg = <0x1e6e2000 0x1a8>; pinctrl: pinctrl {
Signature · 1 line
2.9.3
Re: [PATCH v4 1/5] pinctrl: aspeed: dt: Fix compatibles for the System Control Unit
Quoted 4 lines · Andrew Jeffery
Reference the SoC-specific compatible string in the examples as required.
Signed-off-by Andrew Jeffery <[email protected]>
Quoted 3 lines
--- Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
Re: [PATCH v4 1/5] pinctrl: aspeed: dt: Fix compatibles for the System Control Unit
In reply to Andrew JefferyQuoted 7 lines · Andrew Jeffery
Reference the SoC-specific compatible string in the examples as required.
Signed-off-by Andrew Jeffery <[email protected]>--- Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 1/5] pinctrl: aspeed: dt: Fix compatibles for the System Control Unit
In reply to Andrew JefferyQuoted 4 lines · Andrew Jeffery
Reference the SoC-specific compatible string in the examples as required.
Signed-off-by Andrew Jeffery <[email protected]>
Patch applied with the ACKs.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v4 2/5 pinctrl: aspeed: Read and write bits in LPC and GFX controllers
In reply to Andrew JefferyThe System Control Unit IP block in the Aspeed SoCs is typically where the pinmux configuration is found, but not always. A number of pins depend on state in one of LPC Host Control (LHC) or SoC Display Controller (GFX) IP blocks, so the Aspeed pinmux drivers should have the means to adjust these as necessary.
We use syscon to cast a regmap over the GFX and LPC blocks, which is used as an arbitration layer between the relevant driver and the pinctrl subsystem. The regmaps are then exposed to the SoC-specific pinctrl drivers by phandles in the devicetree, and are selected during a mux request by querying a new 'ip' member in struct aspeed_sig_desc.
---
Joel: I kept your r-b tag here despite reworking the g5 example bindings, as you've given your r-b for the lpc bindings which are what I have added.
.../devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 80 ++++++++-- drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 18 +-- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 48 ++++-- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 161 +++++++++++++-------- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 32 ++-- 5 files changed, 242 insertions(+), 97 deletions(-)
Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt +71 -9
@@ -1,15 +1,23 @@ +====================== Aspeed Pin Controllers ----------------------- +====================== The Aspeed SoCs vary in functionality inside a generation but have a common mux device register layout. -Required properties: -- compatible : Should be any one of the following: - "aspeed,ast2400-pinctrl" - "aspeed,g4-pinctrl" - "aspeed,ast2500-pinctrl" - "aspeed,g5-pinctrl" +Required properties for g4: +- compatible : Should be one of the following: + "aspeed,ast2400-pinctrl" + "aspeed,g4-pinctrl" + +Required properties for g5: +- compatible : Should be one of the following: + "aspeed,ast2500-pinctrl" + "aspeed,g5-pinctrl" + +- aspeed,external-nodes: A cell of phandles to external controller nodes: + 0: compatible with "aspeed,ast2500-gfx", "syscon" + 1: compatible with "aspeed,ast2500-lhc", "syscon" The pin controller node should be the child of a syscon node with the required property:
@@ -24,7 +32,7 @@ Refer to the the bindings described in Documentation/devicetree/bindings/mfd/syscon.txt Subnode Format --------------- +============== The required properties of child nodes are (as defined in pinctrl-bindings): - function
@@ -51,8 +59,11 @@ I2C9 MAC1LINK MDIO1 MDIO2 OSCCLK PEWAKE PWM0 PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 RGMII1 RGMII2 RMII1 RMII2 SD1 SPI1 SPI1DEBUG SPI1PASSTHRU TIMER4 TIMER5 TIMER6 TIMER7 TIMER8 VGABIOSROM +Examples +======== -Examples: +g4 Example +---------- syscon: scu@1e6e2000 { compatible = "aspeed,ast2400-scu", "syscon", "simple-mfd";
@@ -68,5 +79,56 @@ syscon: scu@1e6e2000 { }; }; +g5 Example +---------- + +ahb { + apb { + syscon: scu@1e6e2000 { + compatible = "aspeed,ast2500-scu", "syscon", "simple-mfd"; + reg = <0x1e6e2000 0x1a8>; + + pinctrl: pinctrl { + compatible = "aspeed,g5-pinctrl"; + aspeed,external-nodes = <&gfx &lhc>; + + pinctrl_i2c3_default: i2c3_default { + function = "I2C3"; + groups = "I2C3"; + }; + }; + }; + + gfx: display@1e6e6000 { + compatible = "aspeed,ast2500-gfx", "syscon"; + reg = <0x1e6e6000 0x1000>; + }; + }; + + lpc: lpc@1e789000 { + compatible = "aspeed,ast2500-lpc", "simple-mfd"; + reg = <0x1e789000 0x1000>; + + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x1e789000 0x1000>; + + lpc_host: lpc-host@80 { + compatible = "aspeed,ast2500-lpc-host", "simple-mfd", "syscon"; + reg = <0x80 0x1e0>; + reg-io-width = <4>; + + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x80 0x1e0>; + + lhc: lhc@20 { + compatible = "aspeed,ast2500-lhc"; + reg = <0x20 0x24 0x48 0x8>; + }; + }; + }; +}; + Please refer to pinctrl-bindings.txt in this directory for details of the common pinctrl bindings used by client devices.
drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c +9 -9
@@ -292,7 +292,7 @@ SSSF_PIN_DECL(U18, GPIOG7, FLWP, SIG_DESC_SET(SCU84, 7));#define UART6_DESC SIG_DESC_SET(SCU90, 7)#define ROM16_DESC SIG_DESC_SET(SCU90, 6)#define FLASH_WIDE SIG_DESC_SET(HW_STRAP1, 4) -#define BOOT_SRC_NOR { HW_STRAP1, GENMASK(1, 0), 0, 0 } +#define BOOT_SRC_NOR { ASPEED_IP_SCU, HW_STRAP1, GENMASK(1, 0), 0, 0 }#define A8 56SIG_EXPR_DECL (ROMD8 ,ROM16 ,ROM16_DESC );
@@ -418,9 +418,9 @@ FUNC_GROUP_DECL(I2C8, G5, F3);#define U1 88SSSF_PIN_DECL (U1 ,GPIOL0 ,NCTS1 ,SIG_DESC_SET (SCU84 ,16 )); -#define VPI18_DESC { SCU90, GENMASK(5, 4), 1, 0 } -#define VPI24_DESC { SCU90, GENMASK(5, 4), 2, 0 } -#define VPI30_DESC { SCU90, GENMASK(5, 4), 3, 0 } +#define VPI18_DESC { ASPEED_IP_SCU, SCU90, GENMASK(5, 4), 1, 0 } +#define VPI24_DESC { ASPEED_IP_SCU, SCU90, GENMASK(5, 4), 2, 0 } +#define VPI30_DESC { ASPEED_IP_SCU, SCU90, GENMASK(5, 4), 3, 0 }#define T5 89#define T5_DESC SIG_DESC_SET(SCU84, 17)
@@ -641,11 +641,11 @@ SSSF_PIN_DECL(Y22, GPIOR2, ROMCS3, SIG_DESC_SET(SCU88, 26));#define U19 139SSSF_PIN_DECL (U19 ,GPIOR3 ,ROMCS4 ,SIG_DESC_SET (SCU88 ,27 )); -#define VPOOFF0_DESC { SCU94, GENMASK(1, 0), 0, 0 } -#define VPO12_DESC { SCU94, GENMASK(1, 0), 1, 0 } -#define VPO24_DESC { SCU94, GENMASK(1, 0), 2, 0 } -#define VPOOFF1_DESC { SCU94, GENMASK(1, 0), 3, 0 } -#define VPO_OFF_12 { SCU94, 0x2, 0, 0 } +#define VPOOFF0_DESC { ASPEED_IP_SCU, SCU94, GENMASK(1, 0), 0, 0 } +#define VPO12_DESC { ASPEED_IP_SCU, SCU94, GENMASK(1, 0), 1, 0 } +#define VPO24_DESC { ASPEED_IP_SCU, SCU94, GENMASK(1, 0), 2, 0 } +#define VPOOFF1_DESC { ASPEED_IP_SCU, SCU94, GENMASK(1, 0), 3, 0 } +#define VPO_OFF_12 { ASPEED_IP_SCU, SCU94, 0x2, 0, 0 }#define VPO_24_OFF SIG_DESC_SET(SCU94, 1)#define V21 140
drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c +39 -9
82 lines not on this page · raw message
drivers/pinctrl/aspeed/pinctrl-aspeed.c +100 -61
311 lines not on this page · raw message
drivers/pinctrl/aspeed/pinctrl-aspeed.h +23 -9
@@ -232,6 +232,11 @@* group. */ +#define ASPEED_IP_SCU 0 +#define ASPEED_IP_GFX 1 +#define ASPEED_IP_LPC 2 +#define ASPEED_NR_PINMUX_IPS 3 +/* * The "Multi-function Pins Mapping and Control" table in the SoC datasheet * references registers by the device/offset mnemonic. The register macros
@@ -261,7 +266,9 @@* A signal descriptor, which describes the register, bits and the * enable/disable values that should be compared or written. * -* @reg: The register offset from base in bytes +* @ip: The IP block identifier, used as an index into the regmap array in +* struct aspeed_pinctrl_data +* @reg: The register offset with respect to the base address of the IP block * @mask: The mask to apply to the register. The lowest set bit of the mask is * used to derive the shift value. * @enable: The value that enables the function. Value should be in the LSBs,
@@ -270,6 +277,7 @@* LSBs, not at the position of the mask. */ struct aspeed_sig_desc { +unsigned int ip;unsigned int reg;u32 mask;u32 enable;
@@ -313,24 +321,30 @@ struct aspeed_pin_desc {/* Macro hell */ +#define SIG_DESC_IP_BIT (ip, reg, idx, val) \ + { ip, reg, BIT_MASK(idx), val, (((val) + 1) & 1) } +/** -* Short-hand macro for describing a configuration enabled by the state of one -* bit. The disable value is derived. +* Short-hand macro for describing an SCU descriptor enabled by the state of +* one bit. The disable value is derived. * * @reg: The signal's associated register, offset from base * @idx: The signal's bit index in the register * @val: The value (0 or 1) that enables the function */ #define SIG_DESC_BIT (reg, idx, val) \ - { reg, BIT_MASK(idx), val, (((val) + 1) & 1) } + SIG_DESC_IP_BIT(ASPEED_IP_SCU, reg, idx, val) + +#define SIG_DESC_IP_SET (ip, reg, idx) SIG_DESC_IP_BIT(ip, reg, idx, 1)/** -* A further short-hand macro describing a configuration enabled with a set bit. +* A further short-hand macro expanding to an SCU descriptor enabled by a set +* bit. * -* @reg: The configuration's associated register, offset from base -* @idx: The configuration's bit index in the register +* @reg: The register, offset from base +* @idx: The bit index in the register */ -#define SIG_DESC_SET (reg, idx) SIG_DESC_BIT(reg, idx, 1) +#define SIG_DESC_SET (reg, idx) SIG_DESC_IP_BIT(ASPEED_IP_SCU, reg, idx, 1)#define SIG_DESC_LIST_SYM (sig, func) sig_descs_ ## sig ## _ ## func#define SIG_DESC_LIST_DECL (sig, func, ...) \
@@ -500,7 +514,7 @@ struct aspeed_pin_desc { MS_PIN_DECL_(pin, SIG_EXPR_LIST_PTR(gpio))struct aspeed_pinctrl_data { -struct regmap *map; +struct regmap *maps[ASPEED_NR_PINMUX_IPS ];const struct pinctrl_pin_desc *pins;const unsigned int npins;
Signature · 1 line
2.9.3
Re: [PATCH v4 2/5] pinctrl: aspeed: Read and write bits in LPC and GFX controllers
Quoted 12 lines · Andrew Jeffery
The System Control Unit IP block in the Aspeed SoCs is typically where the pinmux configuration is found, but not always. A number of pins depend on state in one of LPC Host Control (LHC) or SoC Display Controller (GFX) IP blocks, so the Aspeed pinmux drivers should have the means to adjust these as necessary.
We use syscon to cast a regmap over the GFX and LPC blocks, which is used as an arbitration layer between the relevant driver and the pinctrl subsystem. The regmaps are then exposed to the SoC-specific pinctrl drivers by phandles in the devicetree, and are selected during a mux request by querying a new 'ip' member in struct
aspeed_sig_desc.
Quoted 8 lines
Signed-off-by Andrew Jeffery <[email protected]>Reviewed-by Joel Stanley <[email protected]>---
Joel: I kept your r-b tag here despite reworking the g5 example bindings, as you've given your r-b for the lpc bindings which are what I have added.
.../devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 80 ++++++++--
Quoted 5 lines
drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 18 +-- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 48 ++++-- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 161 +++++++++++++-------- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 32 ++-- 5 files changed, 242 insertions(+), 97 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 2/5] pinctrl: aspeed: Read and write bits in LPC and GFX controllers
In reply to Andrew JefferyQuoted 6 lines · Andrew Jeffery
The System Control Unit IP block in the Aspeed SoCs is typically where the pinmux configuration is found, but not always. A number of pins depend on state in one of LPC Host Control (LHC) or SoC Display Controller (GFX) IP blocks, so the Aspeed pinmux drivers should have the means to adjust these as necessary.
Quoted 8 lines
We use syscon to cast a regmap over the GFX and LPC blocks, which is used as an arbitration layer between the relevant driver and the pinctrl subsystem. The regmaps are then exposed to the SoC-specific pinctrl drivers by phandles in the devicetree, and are selected during a mux request by querying a new 'ip' member in struct
aspeed_sig_desc.Signed-off-by Andrew Jeffery <[email protected]>Reviewed-by Joel Stanley <[email protected]>
Patch applied, adding Rob's ack in the process.
Yours,
Linus Walleij
PATCH v4 3/5 pinctrl: aspeed-g4: Add mux configuration for all pins
In reply to Andrew JefferyThe patch introducing the g4 pinctrl driver implemented a smattering of pins to flesh out the implementation of the core and provide bare-bones support for some OpenPOWER platforms. Now, update the bindings document to reflect the complete functionality and implement the necessary pin configuration tables in the driver.
--- .../devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 19 +- drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 1097 +++++++++++++++++++- 2 files changed, 1096 insertions(+), 20 deletions(-)
Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt +12 -7
@@ -44,13 +44,18 @@ supported: aspeed,ast2400-pinctrl, aspeed,g4-pinctrl: -ACPI BMCINT DDCCLK DDCDAT FLACK FLBUSY FLWP GPID0 GPIE0 GPIE2 GPIE4 GPIE6 I2C10 -I2C11 I2C12 I2C13 I2C3 I2C4 I2C5 I2C6 I2C7 I2C8 I2C9 LPCPD LPCPME LPCSMI MDIO1 -MDIO2 NCTS1 NCTS3 NCTS4 NDCD1 NDCD3 NDCD4 NDSR1 NDSR3 NDTR1 NDTR3 NRI1 NRI3 -NRI4 NRTS1 NRTS3 PWM0 PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 RGMII1 RMII1 ROM16 -ROM8 ROMCS1 ROMCS2 ROMCS3 ROMCS4 RXD1 RXD3 RXD4 SD1 SGPMI SIOPBI SIOPBO TIMER3 -TIMER5 TIMER6 TIMER7 TIMER8 TXD1 TXD3 TXD4 UART6 VGAHS VGAVS VPI18 VPI24 VPI30 -VPO12 VPO24 +ACPI ADC0 ADC1 ADC10 ADC11 ADC12 ADC13 ADC14 ADC15 ADC2 ADC3 ADC4 ADC5 ADC6 +ADC7 ADC8 ADC9 BMCINT DDCCLK DDCDAT EXTRST FLACK FLBUSY FLWP GPID GPID0 GPID2 +GPID4 GPID6 GPIE0 GPIE2 GPIE4 GPIE6 I2C10 I2C11 I2C12 I2C13 I2C14 I2C3 I2C4 +I2C5 I2C6 I2C7 I2C8 I2C9 LPCPD LPCPME LPCRST LPCSMI MAC1LINK MAC2LINK MDIO1 +MDIO2 NCTS1 NCTS2 NCTS3 NCTS4 NDCD1 NDCD2 NDCD3 NDCD4 NDSR1 NDSR2 NDSR3 NDSR4 +NDTR1 NDTR2 NDTR3 NDTR4 NDTS4 NRI1 NRI2 NRI3 NRI4 NRTS1 NRTS2 NRTS3 OSCCLK PWM0 +PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 RGMII1 RGMII2 RMII1 RMII2 ROM16 ROM8 ROMCS1 +ROMCS2 ROMCS3 ROMCS4 RXD1 RXD2 RXD3 RXD4 SALT1 SALT2 SALT3 SALT4 SD1 SD2 SGPMCK +SGPMI SGPMLD SGPMO SGPSCK SGPSI0 SGPSI1 SGPSLD SIOONCTRL SIOPBI SIOPBO SIOPWREQ +SIOPWRGD SIOS3 SIOS5 SIOSCI SPI1 SPI1DEBUG SPI1PASSTHRU SPICS1 TIMER3 TIMER4 +TIMER5 TIMER6 TIMER7 TIMER8 TXD1 TXD2 TXD3 TXD4 UART6 USBCKI VGABIOS_ROM VGAHS +VGAVS VPI18 VPI24 VPI30 VPO12 VPO24 WDTRST1 WDTRST2 aspeed,ast2500-pinctrl, aspeed,g5-pinctrl:
drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c +1084 -13
1,440 lines not on this page · raw message
Signature · 1 line
2.9.3
Re: [PATCH v4 3/5] pinctrl: aspeed-g4: Add mux configuration for all pins
Quoted 10 lines · Andrew Jeffery
The patch introducing the g4 pinctrl driver implemented a smattering of pins to flesh out the implementation of the core and provide bare-bones support for some OpenPOWER platforms. Now, update the bindings document to reflect the complete functionality and implement the necessary pin configuration tables in the driver.
Cc Timothy Pearson <[email protected]>Signed-off-by Andrew Jeffery <[email protected]>Acked-by Joel Stanley <[email protected]>Acked-by Rob Herring <[email protected]>
Patch applied.
Yours,
Linus Walleij
PATCH v4 4/5 pinctrl: aspeed-g5: Add mux configuration for all pins
In reply to Andrew JefferyThe patch introducing the g5 pinctrl driver implemented a smattering of pins to flesh out the implementation of the core and provide bare-bones support for some OpenPOWER platforms and the AST2500 evaluation board. Now, update the bindings document to reflect the complete functionality and implement the necessary pin configuration tables in the driver.
--- .../devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 17 +- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 1476 +++++++++++++++++++- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 1 + 3 files changed, 1487 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt +13 -4
@@ -59,10 +59,19 @@ VGAVS VPI18 VPI24 VPI30 VPO12 VPO24 WDTRST1 WDTRST2 aspeed,ast2500-pinctrl, aspeed,g5-pinctrl: -GPID0 GPID2 GPIE0 I2C10 I2C11 I2C12 I2C13 I2C14 I2C3 I2C4 I2C5 I2C6 I2C7 I2C8 -I2C9 MAC1LINK MDIO1 MDIO2 OSCCLK PEWAKE PWM0 PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 -RGMII1 RGMII2 RMII1 RMII2 SD1 SPI1 SPI1DEBUG SPI1PASSTHRU TIMER4 TIMER5 TIMER6 -TIMER7 TIMER8 VGABIOSROM +ACPI ADC0 ADC1 ADC10 ADC11 ADC12 ADC13 ADC14 ADC15 ADC2 ADC3 ADC4 ADC5 ADC6 +ADC7 ADC8 ADC9 BMCINT DDCCLK DDCDAT ESPI FWSPICS1 FWSPICS2 GPID0 GPID2 GPID4 +GPID6 GPIE0 GPIE2 GPIE4 GPIE6 I2C10 I2C11 I2C12 I2C13 I2C14 I2C3 I2C4 I2C5 I2C6 +I2C7 I2C8 I2C9 LAD0 LAD1 LAD2 LAD3 LCLK LFRAME LPCHC LPCPD LPCPLUS LPCPME +LPCRST LPCSMI LSIRQ MAC1LINK MAC2LINK MDIO1 MDIO2 NCTS1 NCTS2 NCTS3 NCTS4 NDCD1 +NDCD2 NDCD3 NDCD4 NDSR1 NDSR2 NDSR3 NDSR4 NDTR1 NDTR2 NDTR3 NDTR4 NRI1 NRI2 +NRI3 NRI4 NRTS1 NRTS2 NRTS3 NRTS4 OSCCLK PEWAKE PNOR PWM0 PWM1 PWM2 PWM3 PWM4 +PWM5 PWM6 PWM7 RGMII1 RGMII2 RMII1 RMII2 RXD1 RXD2 RXD3 RXD4 SALT1 SALT10 +SALT11 SALT12 SALT13 SALT14 SALT2 SALT3 SALT4 SALT5 SALT6 SALT7 SALT8 SALT9 +SCL1 SCL2 SD1 SD2 SDA1 SDA2 SGPS1 SGPS2 SIOONCTRL SIOPBI SIOPBO SIOPWREQ +SIOPWRGD SIOS3 SIOS5 SIOSCI SPI1 SPI1CS1 SPI1DEBUG SPI1PASSTHRU SPI2CK SPI2CS0 +SPI2CS1 SPI2MISO SPI2MOSI TIMER3 TIMER4 TIMER5 TIMER6 TIMER7 TIMER8 TXD1 TXD2 +TXD3 TXD4 UART6 USBCKI VGABIOSROM VGAHS VGAVS VPI24 VPO WDTRST1 WDTRST2 Examples ========
drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c +1473 -3
1,701 lines not on this page · raw message
drivers/pinctrl/aspeed/pinctrl-aspeed.h +1 -0
@@ -260,6 +260,7 @@#define SCUA0 0xA0/* Multi-function Pin Control #7 */ #define SCUA4 0xA4/* Multi-function Pin Control #8 */ #define SCUA8 0xA8/* Multi-function Pin Control #9 */ +#define SCUAC 0xAC/* Multi-function Pin Control #10 */ #define HW_STRAP2 0xD0/* Strapping */ /**
Signature · 1 line
2.9.3
Re: [PATCH v4 4/5] pinctrl: aspeed-g5: Add mux configuration for all pins
Quoted 9 lines · Andrew Jeffery
The patch introducing the g5 pinctrl driver implemented a smattering of pins to flesh out the implementation of the core and provide bare-bones support for some OpenPOWER platforms and the AST2500 evaluation board. Now, update the bindings document to reflect the complete functionality and implement the necessary pin configuration tables in the driver.
Signed-off-by Andrew Jeffery <[email protected]>Acked-by Joel Stanley <[email protected]>Acked-by Rob Herring <[email protected]>
Patch applied.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v4 5/5 pinctrl: aspeed: Fix kerneldoc return descriptions
In reply to Andrew Jeffery--- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/pinctrl/aspeed/pinctrl-aspeed.c +6 -6
@@ -97,7 +97,7 @@ static inline void aspeed_sig_desc_print_val(* @enabled: True to query the enabled state, false to query disabled state * @regmap: The IP block's regmap instance * -* @return 1 if the descriptor's bitfield is configured to the state +* Return: 1 if the descriptor's bitfield is configured to the state * selected by @enabled, 0 if not, and less than zero if an unrecoverable * failure occurred *
@@ -134,7 +134,7 @@ static int aspeed_sig_desc_eval(const struct aspeed_sig_desc *desc,* @enabled: True to query the enabled state, false to query disabled state * @maps: The list of regmap instances * -* @return 1 if the expression composed by @enabled evaluates true, 0 if not, +* Return: 1 if the expression composed by @enabled evaluates true, 0 if not, * and less than zero if an unrecoverable failure occurred. * * A mux function is enabled or disabled if the function's signal expression
@@ -175,7 +175,7 @@ static int aspeed_sig_expr_eval(const struct aspeed_sig_expr *expr,* expression, false to disable the function's signal * @maps: The list of regmap instances for pinmux register access. * -* @return 0 if the expression is configured as requested and a negative error +* Return: 0 if the expression is configured as requested and a negative error * code otherwise */ static int aspeed_sig_expr_set(const struct aspeed_sig_expr *expr,
@@ -256,7 +256,7 @@ static int aspeed_sig_expr_disable(const struct aspeed_sig_expr *expr,* @exprs: The list of signal expressions (from a priority level on a pin) * @maps: The list of regmap instances for pinmux register access. * -* @return 0 if all expressions are disabled, otherwise a negative error code +* Return: 0 if all expressions are disabled, otherwise a negative error code */ static int aspeed_disable_sig (const struct aspeed_sig_expr **exprs,struct regmap *const *maps)
@@ -281,8 +281,8 @@ static int aspeed_disable_sig(const struct aspeed_sig_expr **exprs,* @exprs: List of signal expressions (haystack) * @name: The name of the requested function (needle) * -* @return A pointer to the signal expression whose function tag matches the -* provided name, otherwise NULL. +* Return: A pointer to the signal expression whose function tag matches the +* provided name, otherwise NULL. * */ static const struct aspeed_sig_expr *aspeed_find_expr_by_name(
Signature · 1 line
2.9.3
Re: [PATCH v4 5/5] pinctrl: aspeed: Fix kerneldoc return descriptions
Quoted 2 lines · Andrew Jeffery
Signed-off-by Andrew Jeffery <[email protected]>Acked-by Joel Stanley <[email protected]>
Patch applied.
Yours,
Linus Walleij