* [PATCH v10 00/13] phy: Add support for Lynx 10G SerDes
@ 2023-03-06 19:15 Sean Anderson
2023-03-06 19:15 ` [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml Sean Anderson
0 siblings, 1 reply; 15+ messages in thread
From: Sean Anderson @ 2023-03-06 19:15 UTC (permalink / raw)
To: Vinod Koul, Kishon Vijay Abraham I, linux-phy
Cc: Madalin Bucur, linuxppc-dev, devicetree, Ioana Ciornei,
Rob Herring, Camelia Alexandra Groza, linux-arm-kernel,
Bagas Sanjaya, Krzysztof Kozlowski, Sean Anderson,
Bartosz Golaszewski, Fernández Rojas, Jonas Gorski,
Jonathan Corbet, Li Yang, Linus Walleij, Michael Turquette,
Shawn Guo, Stephen Boyd, linux-clk, linux-doc, linux-gpio
This adds support for the Lynx 10G SerDes found on the QorIQ T-series
and Layerscape series. Due to limited time and hardware, only support
for the LS1046ARDB and LS1088ARDB is added in this initial series.
This series is based on phy/next, but it requires phylink support. This
is already present for the LS1088A, and it was recently added for the
LS1046A in net-next/master.
Major reconfiguration of baud rate (e.g. 1G->10G) does not work. From my
testing, SerDes register settings appear identical. The issue appears to
be between the PCS and the MAC. The link itself comes up at both ends,
and a mac loopback succeeds. However, a PCS loopback results in dropped
packets. Perhaps there is some undocumented register in the PCS?
I suspect this driver is around 95% complete, but I don't have the
documentation to make it work completely. At the very least it is useful
for two cases:
- Although this is untested, it should support 2.5G SGMII as well as
1000BASE-KX. The latter needs MAC and PCS support, but the former
should work out of the box.
- It allows for clock configurations not supported by the RCW. This is
very useful if you want to use e.g. SRDS_PRTCL_S1=0x3333 and =0x1133
on the same board. This is because the former setting will use PLL1
as the 1G reference, but the latter will use PLL1 as the 10G
reference. Because we can reconfigure the PLLs, it is possible to
always use PLL1 as the 1G reference.
The final patch in this series depends on [1].
[1] https://lore.kernel.org/netdev/20221227230918.2440351-1-sean.anderson@seco.com/
Changes in v10:
- Convert gpio-mmio to yaml
- Add compatible for QIXIS
- Remove unnecessary inclusion of clk.h
- Don't gate clocks in compatibility mode
- Fix debugging print with incorrect error variable
- Move serdes bindings to SoC dtsi
- Add support for all (ethernet) serdes modes
- Refer to "nodes" instead of "bindings"
- Move compatible/reg first
Changes in v9:
- Add fsl,unused-lanes-reserved to allow for a gradual transition
between firmware and Linux control of the SerDes
- Change phy-type back to fsl,type, as I was getting the error
'#phy-cells' is a dependency of 'phy-type'
- Convert some u32s to unsigned long to match arguments
- Switch from round_rate to determine_rate
- Drop explicit reference to reference clock
- Use .parent_names when requesting parents
- Use devm_clk_hw_get_clk to pass clocks back to serdes
- Fix indentation
- Split off clock "driver" into its own patch to allow for better
review.
- Add ability to defer lane initialization to phy_init. This allows
for easier transitioning between firmware-managed serdes and Linux-
managed serdes, as the consumer (such as dpaa2, which knows what the
firmware is doing) has the last say on who gets control.
- Fix name of phy mode node
- Add fsl,unused-lanes-reserved to allow a gradual transition, depending
on the mac link type.
- Remove unused clocks
- Fix some phy mode node names
Changes in v8:
- Remove unused variable from lynx_ls_mode_init
- Rename serdes phy handles to use _A, _B, etc. instead of _0, _1, etc.
This should help remind readers that the numbering corresponds to the
physical layout of the registers, and not the lane (pin) number.
- Prevent PCSs from probing as phys
- Rename serdes phy handles like the LS1046A
- Add SFP slot binding
- Fix incorrect lane ordering (it's backwards on the LS1088A just like it is in
the LS1046A).
- Fix duplicated lane 2 (it should have been lane 3).
- Fix incorrectly-documented value for XFI1.
- Remove interrupt for aquantia phy. It never fired for whatever reason,
preventing the link from coming up.
- Add GPIOs for QIXIS FPGA.
- Enable MAC1 PCS
- Remove si5341 binding
Changes in v7:
- Use double quotes everywhere in yaml
- Break out call order into generic documentation
- Refuse to switch "major" protocols
- Update Kconfig to reflect restrictions
- Remove set/clear of "pcs reset" bit, since it doesn't seem to fix
anything.
Changes in v6:
- Bump PHY_TYPE_2500BASEX to 13, since PHY_TYPE_USXGMII was added in the
meantime
- fsl,type -> phy-type
- frequence -> frequency
- Update MAINTAINERS to include new files
- Include bitfield.h and slab.h to allow compilation on non-arm64
arches.
- Depend on COMMON_CLK and either layerscape/ppc
- XGI.9 -> XFI.9
Changes in v5:
- Update commit description
- Dual id header
- Remove references to PHY_INTERFACE_MODE_1000BASEKX to allow this
series to be applied directly to linux/master.
- Add fsl,lynx-10g.h to MAINTAINERS
Changes in v4:
- Add 2500BASE-X and 10GBASE-R phy types
- Use subnodes to describe lane configuration, instead of describing
PCCRs. This is the same style used by phy-cadence-sierra et al.
- Add ids for Lynx 10g PLLs
- Rework all debug statements to remove use of __func__. Additional
information has been provided as necessary.
- Consider alternative parent rates in round_rate and not in set_rate.
Trying to modify out parent's rate in set_rate will deadlock.
- Explicitly perform a stop/reset sequence in set_rate. This way we
always ensure that the PLL is properly stopped.
- Set the power-down bit when disabling the PLL. We can do this now that
enable/disable aren't abused during the set rate sequence.
- Fix typos in QSGMII_OFFSET and XFI_OFFSET
- Rename LNmTECR0_TEQ_TYPE_PRE to LNmTECR0_TEQ_TYPE_POST to better
reflect its function (adding post-cursor equalization).
- Use of_clk_hw_onecell_get instead of a custom function.
- Return struct clks from lynx_clks_init instead of embedding lynx_clk
in lynx_priv.
- Rework PCCR helper functions; T-series SoCs differ from Layerscape SoCs
primarily in the layout and offset of the PCCRs. This will help bring a
cleaner abstraction layer. The caps have been removed, since this handles the
only current usage.
- Convert to use new binding format. As a result of this, we no longer need to
have protocols for PCIe or SATA. Additionally, modes now live in lynx_group
instead of lynx_priv.
- Remove teq from lynx_proto_params, since it can be determined from
preq_ratio/postq_ratio.
- Fix an early return from lynx_set_mode not releasing serdes->lock.
- Rename lynx_priv.conf to .cfg, since I kept mistyping it.
Changes in v3:
- Manually expand yaml references
- Add mode configuration to device tree
- Rename remaining references to QorIQ SerDes to Lynx 10G
- Fix PLL enable sequence by waiting for our reset request to be cleared
before continuing. Do the same for the lock, even though it isn't as
critical. Because we will delay for 1.5ms on average, use prepare
instead of enable so we can sleep.
- Document the status of each protocol
- Fix offset of several bitfields in RECR0
- Take into account PLLRST_B, SDRST_B, and SDEN when considering whether
a PLL is "enabled."
- Only power off unused lanes.
- Split mode lane mask into first/last lane (like group)
- Read modes from device tree
- Use caps to determine whether KX/KR are supported
- Move modes to lynx_priv
- Ensure that the protocol controller is not already in-use when we try
to configure a new mode. This should only occur if the device tree is
misconfigured (e.g. when QSGMII is selected on two lanes but there is
only one QSGMII controller).
- Split PLL drivers off into their own file
- Add clock for "ext_dly" instead of writing the bit directly (and
racing with any clock code).
- Use kasprintf instead of open-coding the snprintf dance
- Support 1000BASE-KX in lynx_lookup_proto. This still requires PCS
support, so nothing is truly "enabled" yet.
- Describe modes in device tree
- ls1088a: Add serdes bindings
Changes in v2:
- Rename to fsl,lynx-10g.yaml
- Refer to the device in the documentation, rather than the binding
- Move compatible first
- Document phy cells in the description
- Allow a value of 1 for phy-cells. This allows for compatibility with
the similar (but according to Ioana Ciornei different enough) lynx-28g
binding.
- Remove minItems
- Use list for clock-names
- Fix example binding having too many cells in regs
- Add #clock-cells. This will allow using assigned-clocks* to configure
the PLLs.
- Document the structure of the compatible strings
- Rename driver to Lynx 10G (etc.)
- Fix not clearing group->pll after disabling it
- Support 1 and 2 phy-cells
- Power off lanes during probe
- Clear SGMIIaCR1_PCS_EN during probe
- Rename LYNX_PROTO_UNKNOWN to LYNX_PROTO_NONE
- Handle 1000BASE-KX in lynx_proto_mode_prep
- Use one phy cell for SerDes1, since no lanes can be grouped
- Disable SerDes by default to prevent breaking boards inadvertently.
Sean Anderson (13):
dt-bindings: phy: Add 2500BASE-X and 10GBASE-R
dt-bindings: phy: Add Lynx 10G phy binding
dt-bindings: Convert gpio-mmio to yaml
dt-bindings: gpio-mmio: Add compatible for QIXIS
dt-bindings: clock: Add ids for Lynx 10g PLLs
clk: Add Lynx 10G SerDes PLL driver
phy: fsl: Add Lynx 10G SerDes driver
phy: lynx10g: Enable by default on Layerscape
arm64: dts: ls1046a: Add serdes nodes
arm64: dts: ls1046ardb: Add serdes descriptions
arm64: dts: ls1088a: Add serdes nodes
arm64: dts: ls1088a: Prevent PCSs from probing as phys
arm64: dts: ls1088ardb: Add serdes descriptions
.../bindings/gpio/brcm,bcm6345-gpio.yaml | 16 +-
.../devicetree/bindings/gpio/gpio-mmio.yaml | 142 ++
.../bindings/gpio/ni,169445-nand-gpio.txt | 38 -
.../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 -
.../devicetree/bindings/phy/fsl,lynx-10g.yaml | 248 ++++
Documentation/driver-api/phy/index.rst | 1 +
Documentation/driver-api/phy/lynx_10g.rst | 58 +
MAINTAINERS | 9 +
.../boot/dts/freescale/fsl-ls1046a-rdb.dts | 26 +
.../arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 111 ++
.../boot/dts/freescale/fsl-ls1088a-rdb.dts | 82 +-
.../arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 156 ++-
drivers/clk/Makefile | 1 +
drivers/clk/clk-fsl-lynx-10g.c | 510 +++++++
drivers/phy/freescale/Kconfig | 23 +
drivers/phy/freescale/Makefile | 1 +
drivers/phy/freescale/phy-fsl-lynx-10g.c | 1224 +++++++++++++++++
include/dt-bindings/clock/fsl,lynx-10g.h | 14 +
include/dt-bindings/phy/phy.h | 2 +
include/linux/phy/lynx-10g.h | 16 +
20 files changed, 2613 insertions(+), 103 deletions(-)
create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mmio.yaml
delete mode 100644 Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt
delete mode 100644 Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt
create mode 100644 Documentation/devicetree/bindings/phy/fsl,lynx-10g.yaml
create mode 100644 Documentation/driver-api/phy/lynx_10g.rst
create mode 100644 drivers/clk/clk-fsl-lynx-10g.c
create mode 100644 drivers/phy/freescale/phy-fsl-lynx-10g.c
create mode 100644 include/dt-bindings/clock/fsl,lynx-10g.h
create mode 100644 include/linux/phy/lynx-10g.h
--
2.35.1.1320.gc452695387.dirty
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-06 19:15 [PATCH v10 00/13] phy: Add support for Lynx 10G SerDes Sean Anderson @ 2023-03-06 19:15 ` Sean Anderson 2023-03-06 20:51 ` Jonas Gorski ` (3 more replies) 0 siblings, 4 replies; 15+ messages in thread From: Sean Anderson @ 2023-03-06 19:15 UTC (permalink / raw) To: Vinod Koul, Kishon Vijay Abraham I, linux-phy Cc: Madalin Bucur, linuxppc-dev, devicetree, Ioana Ciornei, Rob Herring, Camelia Alexandra Groza, linux-arm-kernel, Bagas Sanjaya, Krzysztof Kozlowski, Sean Anderson, Bartosz Golaszewski, Fernández Rojas, Jonas Gorski, Linus Walleij, linux-gpio This is a generic binding for simple MMIO GPIO controllers. Although we have a single driver for these controllers, they were previously spread over several files. Consolidate them. The register descriptions are adapted from the comments in the source. There is no set order for the registers, so I have not specified one. Signed-off-by: Sean Anderson <sean.anderson@seco.com> --- Changes in v10: - New .../bindings/gpio/brcm,bcm6345-gpio.yaml | 16 +-- .../devicetree/bindings/gpio/gpio-mmio.yaml | 136 ++++++++++++++++++ .../bindings/gpio/ni,169445-nand-gpio.txt | 38 ----- .../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 ----- 4 files changed, 137 insertions(+), 91 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mmio.yaml delete mode 100644 Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt delete mode 100644 Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt diff --git a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml index 4d69f79df859..e11f4af49c52 100644 --- a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml @@ -4,7 +4,7 @@ $id: http://devicetree.org/schemas/gpio/brcm,bcm6345-gpio.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Broadcom BCM6345 GPIO controller +title: Broadcom BCM63xx GPIO controller maintainers: - Álvaro Fernández Rojas <noltari@gmail.com> @@ -18,8 +18,6 @@ description: |+ BCM6338 have 8-bit data and dirout registers, where GPIO state can be read and/or written, and the direction changed from input to output. - BCM6345 have 16-bit data and dirout registers, where GPIO state can be read - and/or written, and the direction changed from input to output. BCM6318, BCM6328, BCM6358, BCM6362, BCM6368 and BCM63268 have 32-bit data and dirout registers, where GPIO state can be read and/or written, and the direction changed from input to output. @@ -29,7 +27,6 @@ properties: enum: - brcm,bcm6318-gpio - brcm,bcm6328-gpio - - brcm,bcm6345-gpio - brcm,bcm6358-gpio - brcm,bcm6362-gpio - brcm,bcm6368-gpio @@ -63,17 +60,6 @@ required: additionalProperties: false examples: - - | - gpio@fffe0406 { - compatible = "brcm,bcm6345-gpio"; - reg-names = "dirout", "dat"; - reg = <0xfffe0406 2>, <0xfffe040a 2>; - native-endian; - - gpio-controller; - #gpio-cells = <2>; - }; - - | gpio@0 { compatible = "brcm,bcm63268-gpio"; diff --git a/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml new file mode 100644 index 000000000000..fd5c7055d542 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml @@ -0,0 +1,136 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/gpio-mmio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic MMIO GPIO + +maintainers: + - Linus Walleij <linus.walleij@linaro.org> + - Bartosz Golaszewski <brgl@bgdev.pl> + +description: | + Some simple GPIO controllers may consist of a single data register or a pair + of set/clear-bit registers. Such controllers are common for glue logic in + FPGAs or ASICs. Commonly, these controllers are accessed over memory-mapped + NAND-style parallel busses. + +properties: + big-endian: + true + + compatible: + enum: + - brcm,bcm6345-gpio # Broadcom BCM6345 GPIO controller + - wd,mbl-gpio # Western Digital MyBook Live memory-mapped GPIO controller + - ni,169445-nand-gpio # National Instruments 169445 GPIO NAND controller + + '#gpio-cells': + const: 2 + + gpio-controller: + true + + reg: + minItems: 1 + description: | + A list of registers in the controller. The width of each register is + determined by its size. All registers must have the same width. The number + of GPIOs is set by the width, with bit 0 corresponding to GPIO 0. + items: + - description: | + Register to READ the value of the GPIO lines. If GPIO line is high, + the bit will be set. If the GPIO line is low, the bit will be cleared. + This register may also be used to drive GPIOs if the SET register is + omitted. + - description: | + Register to SET the value of the GPIO lines. Setting a bit in this + register will drive the GPIO line high. + - description: | + Register to CLEAR the value of the GPIO lines. Setting a bit in this + register will drive the GPIO line low. If this register is omitted, + the SET register will be used to clear the GPIO lines as well, by + actively writing the line with 0. + - description: | + Register to set the line as OUTPUT. Setting a bit in this register + will turn that line into an output line. Conversely, clearing a bit + will turn that line into an input. + - description: | + Register to set this line as INPUT. Setting a bit in this register + will turn that line into an input line. Conversely, clearing a bit + will turn that line into an output. + + reg-names: + minItems: 1 + maxItems: 5 + items: + enum: + - dat + - set + - clr + - dirout + - dirin + + native-endian: + true + + no-output: + $ref: /schemas/types.yaml#/definitions/flag + description: | + If this property is present, the controller cannot drive the GPIO lines. + +required: + - compatible + - reg + - reg-names + - '#gpio-cells' + - gpio-controller + +additionalProperties: false + +examples: + - | + nand-gpio-out@1f300010 { + compatible = "ni,169445-nand-gpio"; + reg = <0x1f300010 0x4>; + reg-names = "dat"; + gpio-controller; + #gpio-cells = <2>; + }; + + nand-gpio-in@1f300014 { + compatible = "ni,169445-nand-gpio"; + reg = <0x1f300014 0x4>; + reg-names = "dat"; + gpio-controller; + #gpio-cells = <2>; + no-output; + }; + + gpio0@e0000000 { + compatible = "wd,mbl-gpio"; + reg-names = "dat"; + reg = <0xe0000000 0x1>; + #gpio-cells = <2>; + gpio-controller; + }; + + gpio1@e0100000 { + compatible = "wd,mbl-gpio"; + reg-names = "dat"; + reg = <0xe0100000 0x1>; + #gpio-cells = <2>; + gpio-controller; + no-output; + }; + + gpio@fffe0406 { + compatible = "brcm,bcm6345-gpio"; + reg-names = "dirout", "dat"; + reg = <0xfffe0406 2>, <0xfffe040a 2>; + native-endian; + + gpio-controller; + #gpio-cells = <2>; + }; diff --git a/Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt b/Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt deleted file mode 100644 index ca2f8c745a27..000000000000 --- a/Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt +++ /dev/null @@ -1,38 +0,0 @@ -Bindings for the National Instruments 169445 GPIO NAND controller - -The 169445 GPIO NAND controller has two memory mapped GPIO registers, one -for input (the ready signal) and one for output (control signals). It is -intended to be used with the GPIO NAND driver. - -Required properties: - - compatible: should be "ni,169445-nand-gpio" - - reg-names: must contain - "dat" - data register - - reg: address + size pairs describing the GPIO register sets; - order must correspond with the order of entries in reg-names - - #gpio-cells: must be set to 2. The first cell is the pin number and - the second cell is used to specify the gpio polarity: - 0 = active high - 1 = active low - - gpio-controller: Marks the device node as a gpio controller. - -Optional properties: - - no-output: disables driving output on the pins - -Examples: - gpio1: nand-gpio-out@1f300010 { - compatible = "ni,169445-nand-gpio"; - reg = <0x1f300010 0x4>; - reg-names = "dat"; - gpio-controller; - #gpio-cells = <2>; - }; - - gpio2: nand-gpio-in@1f300014 { - compatible = "ni,169445-nand-gpio"; - reg = <0x1f300014 0x4>; - reg-names = "dat"; - gpio-controller; - #gpio-cells = <2>; - no-output; - }; diff --git a/Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt b/Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt deleted file mode 100644 index 038c3a6a1f4d..000000000000 --- a/Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt +++ /dev/null @@ -1,38 +0,0 @@ -Bindings for the Western Digital's MyBook Live memory-mapped GPIO controllers. - -The Western Digital MyBook Live has two memory-mapped GPIO controllers. -Both GPIO controller only have a single 8-bit data register, where GPIO -state can be read and/or written. - -Required properties: - - compatible: should be "wd,mbl-gpio" - - reg-names: must contain - "dat" - data register - - reg: address + size pairs describing the GPIO register sets; - order must correspond with the order of entries in reg-names - - #gpio-cells: must be set to 2. The first cell is the pin number and - the second cell is used to specify the gpio polarity: - 0 = active high - 1 = active low - - gpio-controller: Marks the device node as a gpio controller. - -Optional properties: - - no-output: GPIOs are read-only. - -Examples: - gpio0: gpio0@e0000000 { - compatible = "wd,mbl-gpio"; - reg-names = "dat"; - reg = <0xe0000000 0x1>; - #gpio-cells = <2>; - gpio-controller; - }; - - gpio1: gpio1@e0100000 { - compatible = "wd,mbl-gpio"; - reg-names = "dat"; - reg = <0xe0100000 0x1>; - #gpio-cells = <2>; - gpio-controller; - no-output; - }; -- 2.35.1.1320.gc452695387.dirty ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-06 19:15 ` [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml Sean Anderson @ 2023-03-06 20:51 ` Jonas Gorski 2023-03-06 21:27 ` Sean Anderson 2023-03-06 22:04 ` Linus Walleij ` (2 subsequent siblings) 3 siblings, 1 reply; 15+ messages in thread From: Jonas Gorski @ 2023-03-06 20:51 UTC (permalink / raw) To: Sean Anderson Cc: Vinod Koul, Kishon Vijay Abraham I, linux-phy, Madalin Bucur, linuxppc-dev, devicetree, Ioana Ciornei, Rob Herring, Camelia Alexandra Groza, linux-arm-kernel, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Linus Walleij, linux-gpio Hi, On Mon, 6 Mar 2023 at 20:16, Sean Anderson <sean.anderson@seco.com> wrote: > > This is a generic binding for simple MMIO GPIO controllers. Although we > have a single driver for these controllers, they were previously spread > over several files. Consolidate them. The register descriptions are > adapted from the comments in the source. There is no set order for the > registers, so I have not specified one. > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> > --- > > Changes in v10: > - New > > .../bindings/gpio/brcm,bcm6345-gpio.yaml | 16 +-- > .../devicetree/bindings/gpio/gpio-mmio.yaml | 136 ++++++++++++++++++ > .../bindings/gpio/ni,169445-nand-gpio.txt | 38 ----- > .../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 ----- > 4 files changed, 137 insertions(+), 91 deletions(-) > create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mmio.yaml > delete mode 100644 Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt > delete mode 100644 Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt > > diff --git a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml > index 4d69f79df859..e11f4af49c52 100644 > --- a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml > +++ b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml You are (re-)moving the compatible this file is named after, you might want to rename the file as well then. Going by age bcm6358 would be the next oldest one (bcm6318 would be the newest, despite the lowest number). Regards Jonas ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-06 20:51 ` Jonas Gorski @ 2023-03-06 21:27 ` Sean Anderson 2023-03-10 10:33 ` Jonas Gorski 0 siblings, 1 reply; 15+ messages in thread From: Sean Anderson @ 2023-03-06 21:27 UTC (permalink / raw) To: Jonas Gorski Cc: Vinod Koul, Kishon Vijay Abraham I, linux-phy, Madalin Bucur, linuxppc-dev, devicetree, Ioana Ciornei, Rob Herring, Camelia Alexandra Groza, linux-arm-kernel, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Linus Walleij, linux-gpio On 3/6/23 15:51, Jonas Gorski wrote: > Hi, > > On Mon, 6 Mar 2023 at 20:16, Sean Anderson <sean.anderson@seco.com> wrote: >> >> This is a generic binding for simple MMIO GPIO controllers. Although we >> have a single driver for these controllers, they were previously spread >> over several files. Consolidate them. The register descriptions are >> adapted from the comments in the source. There is no set order for the >> registers, so I have not specified one. >> >> Signed-off-by: Sean Anderson <sean.anderson@seco.com> >> --- >> >> Changes in v10: >> - New >> >> .../bindings/gpio/brcm,bcm6345-gpio.yaml | 16 +-- >> .../devicetree/bindings/gpio/gpio-mmio.yaml | 136 ++++++++++++++++++ >> .../bindings/gpio/ni,169445-nand-gpio.txt | 38 ----- >> .../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 ----- >> 4 files changed, 137 insertions(+), 91 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mmio.yaml >> delete mode 100644 Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt >> delete mode 100644 Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt >> >> diff --git a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml >> index 4d69f79df859..e11f4af49c52 100644 >> --- a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml >> +++ b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml > > You are (re-)moving the compatible this file is named after, you might > want to rename the file as well then. Going by age bcm6358 would be > the next oldest one (bcm6318 would be the newest, despite the lowest > number). I can do that. Would it be fine to rename to e.g. brcm,bcm63xx-gpio.yaml? --Sean ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-06 21:27 ` Sean Anderson @ 2023-03-10 10:33 ` Jonas Gorski 0 siblings, 0 replies; 15+ messages in thread From: Jonas Gorski @ 2023-03-10 10:33 UTC (permalink / raw) To: Sean Anderson Cc: Vinod Koul, Kishon Vijay Abraham I, linux-phy, Madalin Bucur, linuxppc-dev, devicetree, Ioana Ciornei, Rob Herring, Camelia Alexandra Groza, linux-arm-kernel, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Linus Walleij, linux-gpio On Mon, 6 Mar 2023 at 22:27, Sean Anderson <sean.anderson@seco.com> wrote: > > On 3/6/23 15:51, Jonas Gorski wrote: > > Hi, > > > > On Mon, 6 Mar 2023 at 20:16, Sean Anderson <sean.anderson@seco.com> wrote: > >> > >> This is a generic binding for simple MMIO GPIO controllers. Although we > >> have a single driver for these controllers, they were previously spread > >> over several files. Consolidate them. The register descriptions are > >> adapted from the comments in the source. There is no set order for the > >> registers, so I have not specified one. > >> > >> Signed-off-by: Sean Anderson <sean.anderson@seco.com> > >> --- > >> > >> Changes in v10: > >> - New > >> > >> .../bindings/gpio/brcm,bcm6345-gpio.yaml | 16 +-- > >> .../devicetree/bindings/gpio/gpio-mmio.yaml | 136 ++++++++++++++++++ > >> .../bindings/gpio/ni,169445-nand-gpio.txt | 38 ----- > >> .../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 ----- > >> 4 files changed, 137 insertions(+), 91 deletions(-) > >> create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mmio.yaml > >> delete mode 100644 Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt > >> delete mode 100644 Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt > >> > >> diff --git a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml > >> index 4d69f79df859..e11f4af49c52 100644 > >> --- a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml > >> +++ b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml > > > > You are (re-)moving the compatible this file is named after, you might > > want to rename the file as well then. Going by age bcm6358 would be > > the next oldest one (bcm6318 would be the newest, despite the lowest > > number). > > I can do that. Would it be fine to rename to e.g. brcm,bcm63xx-gpio.yaml? I'm not up to date with current naming policies (if there are any at all), but looking at what's currently there this should be fine. Jonas ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-06 19:15 ` [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml Sean Anderson 2023-03-06 20:51 ` Jonas Gorski @ 2023-03-06 22:04 ` Linus Walleij 2023-03-07 8:42 ` Krzysztof Kozlowski 2023-03-08 23:10 ` Rob Herring 3 siblings, 0 replies; 15+ messages in thread From: Linus Walleij @ 2023-03-06 22:04 UTC (permalink / raw) To: Sean Anderson Cc: Vinod Koul, Kishon Vijay Abraham I, linux-phy, Madalin Bucur, linuxppc-dev, devicetree, Ioana Ciornei, Rob Herring, Camelia Alexandra Groza, linux-arm-kernel, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Jonas Gorski, linux-gpio Hi Sean, thanks for doing this. I never got around to because time. On Mon, Mar 6, 2023 at 8:16 PM Sean Anderson <sean.anderson@seco.com> wrote: > This is a generic binding for simple MMIO GPIO controllers. Although we > have a single driver for these controllers, they were previously spread > over several files. Consolidate them. The register descriptions are > adapted from the comments in the source. There is no set order for the > registers, so I have not specified one. > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> (...) > + compatible: > + enum: > + - brcm,bcm6345-gpio # Broadcom BCM6345 GPIO controller > + - wd,mbl-gpio # Western Digital MyBook Live memory-mapped GPIO controller > + - ni,169445-nand-gpio # National Instruments 169445 GPIO NAND controller I think you can inline description: statements in the enum instead of the # hash comments, however IIRC you have to use oneOf and const: to do it, like I do in Documentation/devicetree/bindings/input/touchscreen/cypress,cy8ctma340.yaml but don't overinvest in this if it is cumbersome. Either way: Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-06 19:15 ` [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml Sean Anderson 2023-03-06 20:51 ` Jonas Gorski 2023-03-06 22:04 ` Linus Walleij @ 2023-03-07 8:42 ` Krzysztof Kozlowski 2023-03-07 15:35 ` Sean Anderson 2023-03-08 23:10 ` Rob Herring 3 siblings, 1 reply; 15+ messages in thread From: Krzysztof Kozlowski @ 2023-03-07 8:42 UTC (permalink / raw) To: Sean Anderson, Vinod Koul, Kishon Vijay Abraham I, linux-phy Cc: Madalin Bucur, linuxppc-dev, devicetree, Ioana Ciornei, Rob Herring, Camelia Alexandra Groza, linux-arm-kernel, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Jonas Gorski, Linus Walleij, linux-gpio On 06/03/2023 20:15, Sean Anderson wrote: > This is a generic binding for simple MMIO GPIO controllers. Although we > have a single driver for these controllers, they were previously spread > over several files. Consolidate them. The register descriptions are > adapted from the comments in the source. There is no set order for the > registers, so I have not specified one. > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> > --- > > Changes in v10: > - New > > .../bindings/gpio/brcm,bcm6345-gpio.yaml | 16 +-- > .../devicetree/bindings/gpio/gpio-mmio.yaml | 136 ++++++++++++++++++ > .../bindings/gpio/ni,169445-nand-gpio.txt | 38 ----- > .../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 ----- > 4 files changed, 137 insertions(+), 91 deletions(-) > create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mmio.yaml > delete mode 100644 Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt > delete mode 100644 Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt https://lore.kernel.org/all/20230126-gpio-mmio-fix-v2-1-38397aace340@ncr.com/ https://lore.kernel.org/all/9bc9349d6e13d81c6200b0cd8fa20c76263043f6.1462543458.git.chunkeey@googlemail.com/ Best regards, Krzysztof ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-07 8:42 ` Krzysztof Kozlowski @ 2023-03-07 15:35 ` Sean Anderson 2023-03-08 8:48 ` Krzysztof Kozlowski 2023-03-09 9:16 ` Linus Walleij 0 siblings, 2 replies; 15+ messages in thread From: Sean Anderson @ 2023-03-07 15:35 UTC (permalink / raw) To: Krzysztof Kozlowski, Vinod Koul, Kishon Vijay Abraham I, linux-phy, Niall Leonard Cc: Madalin Bucur, linuxppc-dev, devicetree, Ioana Ciornei, Rob Herring, Camelia Alexandra Groza, linux-arm-kernel, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Jonas Gorski, Linus Walleij, linux-gpio Hi Krzysztof, On 3/7/23 03:42, Krzysztof Kozlowski wrote: > On 06/03/2023 20:15, Sean Anderson wrote: >> This is a generic binding for simple MMIO GPIO controllers. Although we >> have a single driver for these controllers, they were previously spread >> over several files. Consolidate them. The register descriptions are >> adapted from the comments in the source. There is no set order for the >> registers, so I have not specified one. >> >> Signed-off-by: Sean Anderson <sean.anderson@seco.com> >> --- >> >> Changes in v10: >> - New >> >> .../bindings/gpio/brcm,bcm6345-gpio.yaml | 16 +-- >> .../devicetree/bindings/gpio/gpio-mmio.yaml | 136 ++++++++++++++++++ >> .../bindings/gpio/ni,169445-nand-gpio.txt | 38 ----- >> .../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 ----- >> 4 files changed, 137 insertions(+), 91 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mmio.yaml >> delete mode 100644 Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt >> delete mode 100644 Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt > > https://lore.kernel.org/all/20230126-gpio-mmio-fix-v2-1-38397aace340@ncr.com/ Thanks for linking to that. I believe this patch should be applied instead of that one because - It documents all the registers, which were previously only documented in the driver - It handles the endianness properties. - It consolidates the various descriptions of this binding into one schema. --Sean ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-07 15:35 ` Sean Anderson @ 2023-03-08 8:48 ` Krzysztof Kozlowski 2023-03-09 9:16 ` Linus Walleij 1 sibling, 0 replies; 15+ messages in thread From: Krzysztof Kozlowski @ 2023-03-08 8:48 UTC (permalink / raw) To: Sean Anderson, Vinod Koul, Kishon Vijay Abraham I, linux-phy, Niall Leonard Cc: Madalin Bucur, linuxppc-dev, devicetree, Ioana Ciornei, Rob Herring, Camelia Alexandra Groza, linux-arm-kernel, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Jonas Gorski, Linus Walleij, linux-gpio On 07/03/2023 16:35, Sean Anderson wrote: > Hi Krzysztof, > > On 3/7/23 03:42, Krzysztof Kozlowski wrote: >> On 06/03/2023 20:15, Sean Anderson wrote: >>> This is a generic binding for simple MMIO GPIO controllers. Although we >>> have a single driver for these controllers, they were previously spread >>> over several files. Consolidate them. The register descriptions are >>> adapted from the comments in the source. There is no set order for the >>> registers, so I have not specified one. >>> >>> Signed-off-by: Sean Anderson <sean.anderson@seco.com> >>> --- >>> >>> Changes in v10: >>> - New >>> >>> .../bindings/gpio/brcm,bcm6345-gpio.yaml | 16 +-- >>> .../devicetree/bindings/gpio/gpio-mmio.yaml | 136 ++++++++++++++++++ >>> .../bindings/gpio/ni,169445-nand-gpio.txt | 38 ----- >>> .../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 ----- >>> 4 files changed, 137 insertions(+), 91 deletions(-) >>> create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mmio.yaml >>> delete mode 100644 Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt >>> delete mode 100644 Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt >> >> https://lore.kernel.org/all/20230126-gpio-mmio-fix-v2-1-38397aace340@ncr.com/ > > Thanks for linking to that. > > I believe this patch should be applied instead of that one because > > - It documents all the registers, which were previously only documented > in the driver > - It handles the endianness properties. > - It consolidates the various descriptions of this binding into one > schema. Sure, sounds reasonable. You can just quickly check if my other comments apply here as well (but seems not): https://lore.kernel.org/all/4df3ec7a-e4af-89bc-9eda-21150395a935@linaro.org/ Best regards, Krzysztof ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-07 15:35 ` Sean Anderson 2023-03-08 8:48 ` Krzysztof Kozlowski @ 2023-03-09 9:16 ` Linus Walleij 2023-03-13 8:53 ` Leonard, Niall 1 sibling, 1 reply; 15+ messages in thread From: Linus Walleij @ 2023-03-09 9:16 UTC (permalink / raw) To: Sean Anderson, Niall Leonard Cc: Krzysztof Kozlowski, Vinod Koul, Kishon Vijay Abraham I, linux-phy, Madalin Bucur, linuxppc-dev, devicetree, Ioana Ciornei, Rob Herring, Camelia Alexandra Groza, linux-arm-kernel, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Jonas Gorski, linux-gpio On Tue, Mar 7, 2023 at 4:35 PM Sean Anderson <sean.anderson@seco.com> wrote: > On 3/7/23 03:42, Krzysztof Kozlowski wrote: > > https://lore.kernel.org/all/20230126-gpio-mmio-fix-v2-1-38397aace340@ncr.com/ > > Thanks for linking to that. > > I believe this patch should be applied instead of that one because > > - It documents all the registers, which were previously only documented > in the driver > - It handles the endianness properties. > - It consolidates the various descriptions of this binding into one > schema. Niall are you sending a v3 of this patch soon? Include Sean on the reviewer list! Yours, Linus Walleij ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-09 9:16 ` Linus Walleij @ 2023-03-13 8:53 ` Leonard, Niall 2023-03-13 15:19 ` Sean Anderson 2023-03-13 22:13 ` Linus Walleij 0 siblings, 2 replies; 15+ messages in thread From: Leonard, Niall @ 2023-03-13 8:53 UTC (permalink / raw) To: Linus Walleij, Sean Anderson Cc: Krzysztof Kozlowski, Vinod Koul, Kishon Vijay Abraham I, linux-phy@lists.infradead.org, Madalin Bucur, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, Ioana Ciornei, Rob Herring, Camelia Alexandra Groza, linux-arm-kernel@lists.infradead.org, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Jonas Gorski, linux-gpio@vger.kernel.org On 09/03/2023 09:16, Linus Walleij wrote: > *External Message* - Use caution before opening links or attachments > > On Tue, Mar 7, 2023 at 4:35 PM Sean Anderson <sean.anderson@seco.com> wrote: >> On 3/7/23 03:42, Krzysztof Kozlowski wrote: > >>> https://urldefense.com/v3/__https://lore.kernel.org/all/20230126-gpio-mmio-fix-v2-1-38397aace340@ncr.com/__;!!In4Qlw!uQKGkt7dO5TA-561XcuPNoqyti_AogqJ0cV3ymFZNob-Q1-Z1xmcOv_22JBP5xO-OIemaCZ1VY37nWLIe1AXyOkieg$ >> >> Thanks for linking to that. >> >> I believe this patch should be applied instead of that one because >> >> - It documents all the registers, which were previously only documented >> in the driver >> - It handles the endianness properties. >> - It consolidates the various descriptions of this binding into one >> schema. > > Niall are you sending a v3 of this patch soon? > Include Sean on the reviewer list! > > Yours, > Linus Walleij I never got around to working on the V3 patch. The hold up for me was the changes to the bindings. I'm now wondering if I should wait on Sean's patch being accepted and then I could re-submit the driver changes. What's the consensus ? Regards, Niall. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-13 8:53 ` Leonard, Niall @ 2023-03-13 15:19 ` Sean Anderson 2023-03-13 22:13 ` Linus Walleij 1 sibling, 0 replies; 15+ messages in thread From: Sean Anderson @ 2023-03-13 15:19 UTC (permalink / raw) To: Leonard, Niall, Linus Walleij Cc: Krzysztof Kozlowski, Vinod Koul, Kishon Vijay Abraham I, linux-phy@lists.infradead.org, Madalin Bucur, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, Ioana Ciornei, Rob Herring, Camelia Alexandra Groza, linux-arm-kernel@lists.infradead.org, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Jonas Gorski, linux-gpio@vger.kernel.org On 3/13/23 04:53, Leonard, Niall wrote: > [You don't often get email from niall.leonard@ncr.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > On 09/03/2023 09:16, Linus Walleij wrote: >> *External Message* - Use caution before opening links or attachments >> >> On Tue, Mar 7, 2023 at 4:35 PM Sean Anderson <sean.anderson@seco.com> wrote: >>> On 3/7/23 03:42, Krzysztof Kozlowski wrote: >> >>>> https://urldefense.com/v3/__https://lore.kernel.org/all/20230126-gpio-mmio-fix-v2-1-38397aace340@ncr.com/__;!!In4Qlw!uQKGkt7dO5TA-561XcuPNoqyti_AogqJ0cV3ymFZNob-Q1-Z1xmcOv_22JBP5xO-OIemaCZ1VY37nWLIe1AXyOkieg$ >>> >>> Thanks for linking to that. >>> >>> I believe this patch should be applied instead of that one because >>> >>> - It documents all the registers, which were previously only documented >>> in the driver >>> - It handles the endianness properties. >>> - It consolidates the various descriptions of this binding into one >>> schema. >> >> Niall are you sending a v3 of this patch soon? >> Include Sean on the reviewer list! >> >> Yours, >> Linus Walleij > I never got around to working on the V3 patch. The hold up for me was > the changes to the bindings. > I'm now wondering if I should wait on Sean's patch being accepted and > then I could re-submit the driver changes. > What's the consensus ? I am going to submit v11 later today. However, the phy subsystem maintainer refuses to review the phy patches until all the other patches are ready. Therefore, I suspect v11 may not be the last revision of this series. If the GPIO folks want to pick v11 of this patch separately, I think that would help accelerate the process. --Sean ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-13 8:53 ` Leonard, Niall 2023-03-13 15:19 ` Sean Anderson @ 2023-03-13 22:13 ` Linus Walleij 1 sibling, 0 replies; 15+ messages in thread From: Linus Walleij @ 2023-03-13 22:13 UTC (permalink / raw) To: Leonard, Niall Cc: Sean Anderson, Krzysztof Kozlowski, Vinod Koul, Kishon Vijay Abraham I, linux-phy@lists.infradead.org, Madalin Bucur, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, Ioana Ciornei, Rob Herring, Camelia Alexandra Groza, linux-arm-kernel@lists.infradead.org, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Jonas Gorski, linux-gpio@vger.kernel.org On Mon, Mar 13, 2023 at 9:53 AM Leonard, Niall <Niall.Leonard@ncr.com> wrote: > > Niall are you sending a v3 of this patch soon? > > Include Sean on the reviewer list! > I never got around to working on the V3 patch. The hold up for me was > the changes to the bindings. > I'm now wondering if I should wait on Sean's patch being accepted and > then I could re-submit the driver changes. > What's the consensus ? Sean picked it up for shepherding, it looks very good, as soon as the DT maintainers give it a nod Bartosz can merge it. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-06 19:15 ` [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml Sean Anderson ` (2 preceding siblings ...) 2023-03-07 8:42 ` Krzysztof Kozlowski @ 2023-03-08 23:10 ` Rob Herring 2023-03-09 16:03 ` Sean Anderson 3 siblings, 1 reply; 15+ messages in thread From: Rob Herring @ 2023-03-08 23:10 UTC (permalink / raw) To: Sean Anderson Cc: Vinod Koul, Kishon Vijay Abraham I, linux-phy, Madalin Bucur, linuxppc-dev, devicetree, Ioana Ciornei, Camelia Alexandra Groza, linux-arm-kernel, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Jonas Gorski, Linus Walleij, linux-gpio On Mon, Mar 06, 2023 at 02:15:25PM -0500, Sean Anderson wrote: > This is a generic binding for simple MMIO GPIO controllers. Although we > have a single driver for these controllers, they were previously spread > over several files. Consolidate them. The register descriptions are > adapted from the comments in the source. There is no set order for the > registers, so I have not specified one. > > Signed-off-by: Sean Anderson <sean.anderson@seco.com> > --- > > Changes in v10: > - New > > .../bindings/gpio/brcm,bcm6345-gpio.yaml | 16 +-- > .../devicetree/bindings/gpio/gpio-mmio.yaml | 136 ++++++++++++++++++ > .../bindings/gpio/ni,169445-nand-gpio.txt | 38 ----- > .../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 ----- > 4 files changed, 137 insertions(+), 91 deletions(-) > create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mmio.yaml > delete mode 100644 Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt > delete mode 100644 Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt > > diff --git a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml > index 4d69f79df859..e11f4af49c52 100644 > --- a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml > +++ b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml > @@ -4,7 +4,7 @@ > $id: http://devicetree.org/schemas/gpio/brcm,bcm6345-gpio.yaml# > $schema: http://devicetree.org/meta-schemas/core.yaml# > > -title: Broadcom BCM6345 GPIO controller > +title: Broadcom BCM63xx GPIO controller > > maintainers: > - Álvaro Fernández Rojas <noltari@gmail.com> > @@ -18,8 +18,6 @@ description: |+ > > BCM6338 have 8-bit data and dirout registers, where GPIO state can be read > and/or written, and the direction changed from input to output. > - BCM6345 have 16-bit data and dirout registers, where GPIO state can be read > - and/or written, and the direction changed from input to output. > BCM6318, BCM6328, BCM6358, BCM6362, BCM6368 and BCM63268 have 32-bit data > and dirout registers, where GPIO state can be read and/or written, and the > direction changed from input to output. > @@ -29,7 +27,6 @@ properties: > enum: > - brcm,bcm6318-gpio > - brcm,bcm6328-gpio > - - brcm,bcm6345-gpio > - brcm,bcm6358-gpio > - brcm,bcm6362-gpio > - brcm,bcm6368-gpio > @@ -63,17 +60,6 @@ required: > additionalProperties: false > > examples: > - - | > - gpio@fffe0406 { > - compatible = "brcm,bcm6345-gpio"; > - reg-names = "dirout", "dat"; > - reg = <0xfffe0406 2>, <0xfffe040a 2>; > - native-endian; > - > - gpio-controller; > - #gpio-cells = <2>; > - }; > - > - | > gpio@0 { > compatible = "brcm,bcm63268-gpio"; > diff --git a/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml > new file mode 100644 > index 000000000000..fd5c7055d542 > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml > @@ -0,0 +1,136 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/gpio/gpio-mmio.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Generic MMIO GPIO > + > +maintainers: > + - Linus Walleij <linus.walleij@linaro.org> > + - Bartosz Golaszewski <brgl@bgdev.pl> > + > +description: | Don't need '|' unless you want line endings preserved. Elsewhere too. > + Some simple GPIO controllers may consist of a single data register or a pair > + of set/clear-bit registers. Such controllers are common for glue logic in > + FPGAs or ASICs. Commonly, these controllers are accessed over memory-mapped > + NAND-style parallel busses. > + > +properties: > + big-endian: > + true big-endian: true > + > + compatible: > + enum: > + - brcm,bcm6345-gpio # Broadcom BCM6345 GPIO controller > + - wd,mbl-gpio # Western Digital MyBook Live memory-mapped GPIO controller > + - ni,169445-nand-gpio # National Instruments 169445 GPIO NAND controller > + > + '#gpio-cells': > + const: 2 > + > + gpio-controller: > + true ditto. > + > + reg: > + minItems: 1 > + description: | > + A list of registers in the controller. The width of each register is > + determined by its size. All registers must have the same width. The number > + of GPIOs is set by the width, with bit 0 corresponding to GPIO 0. > + items: > + - description: | > + Register to READ the value of the GPIO lines. If GPIO line is high, > + the bit will be set. If the GPIO line is low, the bit will be cleared. > + This register may also be used to drive GPIOs if the SET register is > + omitted. > + - description: | > + Register to SET the value of the GPIO lines. Setting a bit in this > + register will drive the GPIO line high. > + - description: | > + Register to CLEAR the value of the GPIO lines. Setting a bit in this > + register will drive the GPIO line low. If this register is omitted, > + the SET register will be used to clear the GPIO lines as well, by > + actively writing the line with 0. > + - description: | > + Register to set the line as OUTPUT. Setting a bit in this register > + will turn that line into an output line. Conversely, clearing a bit > + will turn that line into an input. > + - description: | > + Register to set this line as INPUT. Setting a bit in this register > + will turn that line into an input line. Conversely, clearing a bit > + will turn that line into an output. > + > + reg-names: > + minItems: 1 > + maxItems: 5 > + items: > + enum: > + - dat > + - set > + - clr > + - dirout > + - dirin > + > + native-endian: > + true > + > + no-output: > + $ref: /schemas/types.yaml#/definitions/flag > + description: | > + If this property is present, the controller cannot drive the GPIO lines. > + > +required: > + - compatible > + - reg > + - reg-names > + - '#gpio-cells' > + - gpio-controller > + > +additionalProperties: false > + > +examples: > + - | > + nand-gpio-out@1f300010 { Use generic node name: gpio@... > + compatible = "ni,169445-nand-gpio"; > + reg = <0x1f300010 0x4>; > + reg-names = "dat"; > + gpio-controller; > + #gpio-cells = <2>; > + }; > + > + nand-gpio-in@1f300014 { > + compatible = "ni,169445-nand-gpio"; > + reg = <0x1f300014 0x4>; > + reg-names = "dat"; > + gpio-controller; > + #gpio-cells = <2>; > + no-output; > + }; > + > + gpio0@e0000000 { > + compatible = "wd,mbl-gpio"; > + reg-names = "dat"; > + reg = <0xe0000000 0x1>; > + #gpio-cells = <2>; > + gpio-controller; > + }; > + > + gpio1@e0100000 { > + compatible = "wd,mbl-gpio"; > + reg-names = "dat"; > + reg = <0xe0100000 0x1>; > + #gpio-cells = <2>; > + gpio-controller; > + no-output; > + }; > + > + gpio@fffe0406 { > + compatible = "brcm,bcm6345-gpio"; > + reg-names = "dirout", "dat"; > + reg = <0xfffe0406 2>, <0xfffe040a 2>; > + native-endian; > + > + gpio-controller; > + #gpio-cells = <2>; > + }; > diff --git a/Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt b/Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt > deleted file mode 100644 > index ca2f8c745a27..000000000000 > --- a/Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt > +++ /dev/null > @@ -1,38 +0,0 @@ > -Bindings for the National Instruments 169445 GPIO NAND controller > - > -The 169445 GPIO NAND controller has two memory mapped GPIO registers, one > -for input (the ready signal) and one for output (control signals). It is > -intended to be used with the GPIO NAND driver. > - > -Required properties: > - - compatible: should be "ni,169445-nand-gpio" > - - reg-names: must contain > - "dat" - data register > - - reg: address + size pairs describing the GPIO register sets; > - order must correspond with the order of entries in reg-names > - - #gpio-cells: must be set to 2. The first cell is the pin number and > - the second cell is used to specify the gpio polarity: > - 0 = active high > - 1 = active low > - - gpio-controller: Marks the device node as a gpio controller. > - > -Optional properties: > - - no-output: disables driving output on the pins > - > -Examples: > - gpio1: nand-gpio-out@1f300010 { > - compatible = "ni,169445-nand-gpio"; > - reg = <0x1f300010 0x4>; > - reg-names = "dat"; > - gpio-controller; > - #gpio-cells = <2>; > - }; > - > - gpio2: nand-gpio-in@1f300014 { > - compatible = "ni,169445-nand-gpio"; > - reg = <0x1f300014 0x4>; > - reg-names = "dat"; > - gpio-controller; > - #gpio-cells = <2>; > - no-output; > - }; > diff --git a/Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt b/Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt > deleted file mode 100644 > index 038c3a6a1f4d..000000000000 > --- a/Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt > +++ /dev/null > @@ -1,38 +0,0 @@ > -Bindings for the Western Digital's MyBook Live memory-mapped GPIO controllers. > - > -The Western Digital MyBook Live has two memory-mapped GPIO controllers. > -Both GPIO controller only have a single 8-bit data register, where GPIO > -state can be read and/or written. > - > -Required properties: > - - compatible: should be "wd,mbl-gpio" > - - reg-names: must contain > - "dat" - data register > - - reg: address + size pairs describing the GPIO register sets; > - order must correspond with the order of entries in reg-names > - - #gpio-cells: must be set to 2. The first cell is the pin number and > - the second cell is used to specify the gpio polarity: > - 0 = active high > - 1 = active low > - - gpio-controller: Marks the device node as a gpio controller. > - > -Optional properties: > - - no-output: GPIOs are read-only. > - > -Examples: > - gpio0: gpio0@e0000000 { > - compatible = "wd,mbl-gpio"; > - reg-names = "dat"; > - reg = <0xe0000000 0x1>; > - #gpio-cells = <2>; > - gpio-controller; > - }; > - > - gpio1: gpio1@e0100000 { > - compatible = "wd,mbl-gpio"; > - reg-names = "dat"; > - reg = <0xe0100000 0x1>; > - #gpio-cells = <2>; > - gpio-controller; > - no-output; > - }; > -- > 2.35.1.1320.gc452695387.dirty > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml 2023-03-08 23:10 ` Rob Herring @ 2023-03-09 16:03 ` Sean Anderson 0 siblings, 0 replies; 15+ messages in thread From: Sean Anderson @ 2023-03-09 16:03 UTC (permalink / raw) To: Rob Herring Cc: Vinod Koul, Kishon Vijay Abraham I, linux-phy, Madalin Bucur, linuxppc-dev, devicetree, Ioana Ciornei, Camelia Alexandra Groza, linux-arm-kernel, Bagas Sanjaya, Krzysztof Kozlowski, Bartosz Golaszewski, Fernández Rojas, Jonas Gorski, Linus Walleij, linux-gpio On 3/8/23 18:10, Rob Herring wrote: > On Mon, Mar 06, 2023 at 02:15:25PM -0500, Sean Anderson wrote: >> This is a generic binding for simple MMIO GPIO controllers. Although we >> have a single driver for these controllers, they were previously spread >> over several files. Consolidate them. The register descriptions are >> adapted from the comments in the source. There is no set order for the >> registers, so I have not specified one. >> >> Signed-off-by: Sean Anderson <sean.anderson@seco.com> >> --- >> >> Changes in v10: >> - New >> >> .../bindings/gpio/brcm,bcm6345-gpio.yaml | 16 +-- >> .../devicetree/bindings/gpio/gpio-mmio.yaml | 136 ++++++++++++++++++ >> .../bindings/gpio/ni,169445-nand-gpio.txt | 38 ----- >> .../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 ----- >> 4 files changed, 137 insertions(+), 91 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mmio.yaml >> delete mode 100644 Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt >> delete mode 100644 Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt >> >> diff --git a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml >> index 4d69f79df859..e11f4af49c52 100644 >> --- a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml >> +++ b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml >> @@ -4,7 +4,7 @@ >> $id: http://devicetree.org/schemas/gpio/brcm,bcm6345-gpio.yaml# >> $schema: http://devicetree.org/meta-schemas/core.yaml# >> >> -title: Broadcom BCM6345 GPIO controller >> +title: Broadcom BCM63xx GPIO controller >> >> maintainers: >> - Álvaro Fernández Rojas <noltari@gmail.com> >> @@ -18,8 +18,6 @@ description: |+ >> >> BCM6338 have 8-bit data and dirout registers, where GPIO state can be read >> and/or written, and the direction changed from input to output. >> - BCM6345 have 16-bit data and dirout registers, where GPIO state can be read >> - and/or written, and the direction changed from input to output. >> BCM6318, BCM6328, BCM6358, BCM6362, BCM6368 and BCM63268 have 32-bit data >> and dirout registers, where GPIO state can be read and/or written, and the >> direction changed from input to output. >> @@ -29,7 +27,6 @@ properties: >> enum: >> - brcm,bcm6318-gpio >> - brcm,bcm6328-gpio >> - - brcm,bcm6345-gpio >> - brcm,bcm6358-gpio >> - brcm,bcm6362-gpio >> - brcm,bcm6368-gpio >> @@ -63,17 +60,6 @@ required: >> additionalProperties: false >> >> examples: >> - - | >> - gpio@fffe0406 { >> - compatible = "brcm,bcm6345-gpio"; >> - reg-names = "dirout", "dat"; >> - reg = <0xfffe0406 2>, <0xfffe040a 2>; >> - native-endian; >> - >> - gpio-controller; >> - #gpio-cells = <2>; >> - }; >> - >> - | >> gpio@0 { >> compatible = "brcm,bcm63268-gpio"; >> diff --git a/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml >> new file mode 100644 >> index 000000000000..fd5c7055d542 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml >> @@ -0,0 +1,136 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/gpio/gpio-mmio.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Generic MMIO GPIO >> + >> +maintainers: >> + - Linus Walleij <linus.walleij@linaro.org> >> + - Bartosz Golaszewski <brgl@bgdev.pl> >> + >> +description: | > > Don't need '|' unless you want line endings preserved. Elsewhere too. OK >> + Some simple GPIO controllers may consist of a single data register or a pair >> + of set/clear-bit registers. Such controllers are common for glue logic in >> + FPGAs or ASICs. Commonly, these controllers are accessed over memory-mapped >> + NAND-style parallel busses. >> + >> +properties: >> + big-endian: >> + true > > big-endian: true OK >> + >> + compatible: >> + enum: >> + - brcm,bcm6345-gpio # Broadcom BCM6345 GPIO controller >> + - wd,mbl-gpio # Western Digital MyBook Live memory-mapped GPIO controller >> + - ni,169445-nand-gpio # National Instruments 169445 GPIO NAND controller >> + >> + '#gpio-cells': >> + const: 2 >> + >> + gpio-controller: >> + true > > ditto. OK --Sean ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2023-03-13 22:14 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-03-06 19:15 [PATCH v10 00/13] phy: Add support for Lynx 10G SerDes Sean Anderson 2023-03-06 19:15 ` [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml Sean Anderson 2023-03-06 20:51 ` Jonas Gorski 2023-03-06 21:27 ` Sean Anderson 2023-03-10 10:33 ` Jonas Gorski 2023-03-06 22:04 ` Linus Walleij 2023-03-07 8:42 ` Krzysztof Kozlowski 2023-03-07 15:35 ` Sean Anderson 2023-03-08 8:48 ` Krzysztof Kozlowski 2023-03-09 9:16 ` Linus Walleij 2023-03-13 8:53 ` Leonard, Niall 2023-03-13 15:19 ` Sean Anderson 2023-03-13 22:13 ` Linus Walleij 2023-03-08 23:10 ` Rob Herring 2023-03-09 16:03 ` Sean Anderson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).