w1: Add AXI 1-wire host driver for AMD programmable logic IP core
Subsystems (3)
Kris Chaplin
maintainerv3 cover w1: Add AXI 1-wire host driver for AMD programmable logic IP core
Changes since v2:
Updated binding patch commit description to specify that version is detected using a register in IP.
Changes since v1:
Updated IP name and binding to axi-1wire-host and filenames to match. Comment pruning where operation obvious, additional comments where not. Unwrapped helper functions for register read/writes. Removed un-necessary device reset on fail to add device. Fixed duplicate clock disable in remove function. Move bus master structure to per instance. Improved hardware testing with multiple w1 instances.
Add a host driver to support the AMD 1-Wire programmable logic IP block. This block guarantees protocol timing for driving off-board devices such as thermal sensors, proms, etc.
Kris Chaplin (2):
dt-bindings: w1: Add YAML DT schema for AMD AXI w1 host and
MAINTAINERS entry
w1: Add AXI 1-wire host driver for AMD programmable logic IP core
.../bindings/w1/amd,axi-1wire-host.yaml | 44 ++ MAINTAINERS | 8 + drivers/w1/masters/Kconfig | 11 + drivers/w1/masters/Makefile | 1 + drivers/w1/masters/amd_axi_w1.c | 395 ++++++++++++++++++ 5 files changed, 459 insertions(+) create mode 100644 Documentation/devicetree/bindings/w1/amd,axi-1wire-host.yaml create mode 100644 drivers/w1/masters/amd_axi_w1.c
Signature · 1 line
2.42.GIT
Kris Chaplin
maintainerPATCH v3 1/2 dt-bindings: w1: Add YAML DT schema for AMD AXI w1 host and MAINTAINERS entry
Add YAML DT schema for the AMD AXI w1 host IP.
This hardware guarantees protocol timing for driving off-board devices such as thermal sensors, proms, etc using the 1wire protocol. The IP has a register to detect hardware version and so the binding does not have an explict version number.
Add MAINTAINERS entry for DT schema.
--- .../bindings/w1/amd,axi-1wire-host.yaml | 44 +++++++++++++++++++ MAINTAINERS | 7 +++ 2 files changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/w1/amd,axi-1wire-host.yaml
Documentation/devicetree/bindings/w1/amd,axi-1wire-host.yaml new file +44 -0
@@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/w1/amd,axi-1wire-host.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AMD AXI 1-wire bus host for programmable logic + +maintainers: + - Kris Chaplin <[email protected]> + +properties: + compatible: + const: amd,axi-1wire-host + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - interrupts + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + onewire@a0000000 { + compatible = "amd,axi-1wire-host"; + reg = <0xa0000000 0x10000>; + clocks = <&zynqmp_clk 0x47>; + interrupts = <GIC_SPI 0x59 IRQ_TYPE_LEVEL_HIGH>; + }; + +...
MAINTAINERS +7 -0
@@ -891,6 +891,13 @@ Q: https://patchwork.kernel.org/project/linux-rdma/list/ F: drivers/infiniband/hw/efa/ F: include/uapi/rdma/efa-abi.h +AMD AXI W1 DRIVER +M: Kris Chaplin <[email protected]> +R: Thomas Delev <[email protected]> +R: Michal Simek <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/w1/amd,axi-1wire-host.yaml + AMD CDX BUS DRIVER M: Nipun Gupta <[email protected]> M: Nikhil Agarwal <[email protected]>
Signature · 1 line
2.42.GIT
Re: [PATCH v3 1/2] dt-bindings: w1: Add YAML DT schema for AMD AXI w1 host and MAINTAINERS entry
Quoted 1 line · Kris Chaplin
Add YAML DT schema for the AMD AXI w1 host IP.
Sorry for not noticing earlier, but if there's another spin, drop 'YAML DT schema for ' from the subject. You already said that with 'dt-bindings'.
Quoted 17 lines
This hardware guarantees protocol timing for driving off-board devices such as thermal sensors, proms, etc using the 1wire protocol. The IP has a register to detect hardware version and so the binding does not have an explict version number.
Add
MAINTAINERSentry for DT schema.Co-developed-by Thomas Delev <[email protected]>Signed-off-by Thomas Delev <[email protected]>Signed-off-by Kris Chaplin <[email protected]>Reviewed-by Conor Dooley <[email protected]>--- .../bindings/w1/amd,axi-1wire-host.yaml | 44 +++++++++++++++++++ MAINTAINERS | 7 +++ 2 files changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/w1/amd,axi-1wire-host.yaml
Re: [PATCH v3 1/2] dt-bindings: w1: Add YAML DT schema for AMD AXI w1 host and MAINTAINERS entry
Quoted 8 lines · Rob Herring
Quoted 1 line · Kris Chaplin
Add YAML DT schema for the AMD AXI w1 host IP.
Sorry for not noticing earlier, but if there's another spin, drop 'YAML DT schema for ' from the subject. You already said that with 'dt-bindings'.
Acked-by Rob Herring <[email protected]>
I can fix it while applying. No need to resend, unless there will be more things to fix.
Anyway this waits till merge window finishes.
Best regards,
Krzysztof
Kris Chaplin
maintainerRe: [PATCH v3 1/2] dt-bindings: w1: Add YAML DT schema for AMD AXI w1 host and MAINTAINERS entry
Quoted 9 lines
Quoted 6 lines
Sorry for not noticing earlier, but if there's another spin, drop 'YAML DT schema for ' from the subject. You already said that with 'dt-bindings'.
Acked-by Rob Herring <[email protected]>I can fix it while applying. No need to resend, unless there will be more things to fix.
Thank you Krzysztof and Rob. I'll amend locally and if we have any other fixes re-send otherwise hold off.
Regards
Kris
Kris Chaplin
maintainerPATCH v3 2/2 w1: Add AXI 1-wire host driver for AMD programmable logic IP core
In reply to Kris ChaplinAdd a host driver to support the AMD 1-Wire programmable logic IP block. This block guarantees protocol timing for driving off-board devices such as thermal sensors, proms, etc.
Add file to MAINTAINERS
--- MAINTAINERS | 1 + drivers/w1/masters/Kconfig | 11 + drivers/w1/masters/Makefile | 1 + drivers/w1/masters/amd_axi_w1.c | 395 ++++++++++++++++++++++++++++++++ 4 files changed, 408 insertions(+) create mode 100644 drivers/w1/masters/amd_axi_w1.c
MAINTAINERS +1 -0
@@ -897,6 +897,7 @@ R: Thomas Delev <[email protected]> R: Michal Simek <[email protected]> S: Maintained F: Documentation/devicetree/bindings/w1/amd,axi-1wire-host.yaml +F: drivers/w1/masters/amd_axi_w1.c AMD CDX BUS DRIVER M: Nipun Gupta <[email protected]>
drivers/w1/masters/Kconfig +11 -0
@@ -5,6 +5,17 @@ menu "1-wire Bus Masters" +config W1_MASTER_AMD_AXI + tristate "AMD AXI 1-wire bus host" + help + Say Y here is you want to support the AMD AXI 1-wire IP core. + This driver makes use of the programmable logic IP to perform + correctly timed 1 wire transactions without relying on GPIO timing + through the kernel. + + This driver can also be built as a module. If so, the module will be + called amd_w1_axi. + config W1_MASTER_MATROX tristate "Matrox G400 transport layer for 1-wire" depends on PCI
drivers/w1/masters/Makefile +1 -0
@@ -3,6 +3,7 @@ # Makefile for 1-wire bus master drivers. # +obj-$(CONFIG_W1_MASTER_AMD_AXI) += amd_axi_w1.o obj-$(CONFIG_W1_MASTER_MATROX) += matrox_w1.o obj-$(CONFIG_W1_MASTER_DS2490) += ds2490.o obj-$(CONFIG_W1_MASTER_DS2482) += ds2482.o
drivers/w1/masters/amd_axi_w1.c new file +395 -0
395 lines not on this page · raw message
Signature · 1 line
2.42.GIT
Krzysztof Kozlowski
AppliedQuoted 12 lines · Kris Chaplin
Changes since v2:
Updated binding patch commit description to specify that version is detected using a register in IP.Changes since v1:
Updated IP name and binding to axi-1wire-host and filenames to match. Comment pruning where operation obvious, additional comments where not. Unwrapped helper functions for register read/writes. Removed un-necessary device reset on fail to add device. Fixed duplicate clock disable in remove function. Move bus master structure to per instance. Improved hardware testing with multiple w1 instances.
Quoted 1 line
[...]
Applied, thanks!
[1/2] dt-bindings: w1: Add YAML DT schema for AMD AXI w1 host and MAINTAINERS entry
https://git.kernel.org/krzk/linux-w1/c/3427fa5b32bbf54e51a2fde347a88161ff16a641 [2/2] w1: Add AXI 1-wire host driver for AMD programmable logic IP core https://git.kernel.org/krzk/linux-w1/c/271c81935801d6449bb7bab5ccfc6cd38238c62b
Best regards,
Signature · 1 line
Krzysztof Kozlowski <[email protected]>
Kris Chaplin
maintainerThank you Krzysztof,
Quoted 3 lines · Krzysztof Kozlowski
Applied, thanks!
Really appreciate all the assistance from you, Michal, Thomas, Conor and Rob.
Regards
Kris