-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ad485x upstreaming #2527
Draft
dbogdan
wants to merge
8
commits into
staging/linus
Choose a base branch
from
staging/linus_ad485x
base: staging/linus
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
ad485x upstreaming #2527
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
10c3ca3
different PR - skip the review for now
amiclaus e98fbe9
iio: backend: add API for interface get
amiclaus 18e7ad3
iio: backend: add support for data size set
amiclaus 683e3f6
iio: adc: adi-axi-adc: add interface type
amiclaus 13807bd
iio: adc: adi-axi-adc: set data format
amiclaus 7c95393
dt-bindings: iio: adc: add ad458x
amiclaus 6defcbb
iio: adc: ad485x: add ad485x driver
amiclaus 13a1fff
Documentation: ABI: testing: ad485x: add ABI docs
amiclaus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
What: /sys/bus/iio/devices/iio:deviceX/packet_format_available | ||
KernelVersion: | ||
Contact: [email protected] | ||
Description: | ||
Packet sizes on the CMOS or LVDS conversion data output bus. | ||
Reading this returns the valid values that can be written to the | ||
packet_format. | ||
|
||
What: /sys/bus/iio/devices/iio:deviceX/packet_format | ||
KernelVersion: | ||
Contact: [email protected] | ||
Description: | ||
This attribute configures the packet size. | ||
Reading returns the actual size used. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
# Copyright 2022 Analog Devices Inc. | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/iio/adc/adi,ad485x.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Analog Devices AD485X DAS family device driver | ||
|
||
maintainers: | ||
- Sergiu Cuciurean <[email protected]> | ||
- Dragos Bogdan <[email protected]> | ||
- Antoniu Miclaus <[email protected]> | ||
|
||
description: | | ||
Analog Devices AD485X DAS family | ||
|
||
https://www.analog.com/media/en/technical-documentation/data-sheets/ad4858.pdf | ||
|
||
properties: | ||
compatible: | ||
enum: | ||
- adi,ad4858 | ||
- adi,ad4857 | ||
- adi,ad4856 | ||
- adi,ad4855 | ||
- adi,ad4854 | ||
- adi,ad4853 | ||
- adi,ad4852 | ||
- adi,ad4851 | ||
- adi,ad4858i | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
vcc-supply: true | ||
|
||
vdd-supply: true | ||
|
||
vddh-supply: true | ||
|
||
vio-supply: true | ||
|
||
pwms: | ||
maxItems: 1 | ||
|
||
io-backends: | ||
maxItems: 1 | ||
|
||
spi-max-frequency: | ||
maximum: 100000000 | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- vcc-supply | ||
- vdd-supply | ||
- vddh-supply | ||
- vio-supply | ||
- pwms | ||
|
||
unevaluatedProperties: false | ||
|
||
examples: | ||
- | | ||
spi { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
adc@0{ | ||
compatible = "adi,ad4858"; | ||
reg = <0>; | ||
spi-max-frequency = <10000000>; | ||
vcc-supply = <&vcc>; | ||
vdd-supply = <&vdd>; | ||
vddh-supply = <&vddh>; | ||
vio-supply = <&vio>; | ||
pwms = <&pwm_gen 0 0>; | ||
io-backends = <&iio_backend>; | ||
}; | ||
}; | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/dts-v1/; | ||
#include "zynq-zed.dts" | ||
|
||
#include <dt-bindings/interrupt-controller/irq.h> | ||
|
||
/ { | ||
clocks { | ||
axi_clk: clock@0 { | ||
compatible = "fixed-clock"; | ||
clock-frequency = <100000000>; | ||
clock-output-names = "axi-clk"; | ||
#clock-cells = <0>; | ||
}; | ||
}; | ||
|
||
vcc: regulator-vcc { | ||
compatible = "regulator-fixed"; | ||
regulator-name = "fixed-supply"; | ||
regulator-min-microvolt = <7250000>; | ||
regulator-max-microvolt = <7250000>; | ||
regulator-always-on; | ||
}; | ||
|
||
vdd: regulator-vdd { | ||
compatible = "regulator-fixed"; | ||
regulator-name = "fixed-supply"; | ||
regulator-min-microvolt = <5000000>; | ||
regulator-max-microvolt = <5000000>; | ||
regulator-always-on; | ||
}; | ||
|
||
vddh: regulator-vddh { | ||
compatible = "regulator-fixed"; | ||
regulator-name = "fixed-supply"; | ||
regulator-min-microvolt = <2500000>; | ||
regulator-max-microvolt = <2500000>; | ||
regulator-always-on; | ||
}; | ||
|
||
vio: regulator-vio { | ||
compatible = "regulator-fixed"; | ||
regulator-name = "fixed-supply"; | ||
regulator-min-microvolt = <3300000>; | ||
regulator-max-microvolt = <3300000>; | ||
regulator-always-on; | ||
}; | ||
|
||
fpga-axi@0 { | ||
compatible = "simple-bus"; | ||
#address-cells = <0x1>; | ||
#size-cells = <0x1>; | ||
ranges; | ||
|
||
rx_dma: dmac@43e00000 { | ||
compatible = "adi,axi-dmac-1.00.a"; | ||
reg = <0x43E00000 0x1000>; | ||
#dma-cells = <1>; | ||
interrupt-parent = <&intc>; | ||
interrupts = <0 54 IRQ_TYPE_LEVEL_HIGH>; | ||
clocks = <&clkc 15>; | ||
|
||
adi,channels { | ||
#size-cells = <0>; | ||
#address-cells = <1>; | ||
|
||
dma_channel: dma-channel@0 { | ||
reg = <0>; | ||
adi,source-bus-width = <128>; | ||
adi,source-bus-type = <2>; | ||
adi,destination-bus-width = <64>; | ||
adi,destination-bus-type = <0>; | ||
}; | ||
}; | ||
}; | ||
|
||
ref_clk: clk@0x44000000 { | ||
compatible = "adi,axi-clkgen-2.00.a"; | ||
reg = <0x44000000 0x10000>; | ||
#clock-cells = <0>; | ||
clocks = <&clkc 15>, <&clkc 16>; | ||
clock-names = "s_axi_aclk", "clkin1"; | ||
clock-output-names = "ref_clk"; | ||
}; | ||
|
||
axi_pwm_gen: pwm@0x43d00000 { | ||
compatible = "adi,axi-pwmgen"; | ||
reg = <0x43d00000 0x1000>; | ||
label = "cnv"; | ||
#pwm-cells = <2>; | ||
clocks = <&ref_clk>; | ||
}; | ||
|
||
iio_backend: axi_adc@43c00000 { | ||
compatible = "adi,axi-adc-10.0.a"; | ||
reg = <0x43c00000 0x10000>; | ||
dmas = <&rx_dma 0>; | ||
dma-names = "rx"; | ||
clocks = <&axi_clk>; | ||
spibus-connected = <&ad485x>; | ||
}; | ||
}; | ||
}; | ||
|
||
&spi0 { | ||
status = "okay"; | ||
|
||
ad485x: adc@0{ | ||
compatible = "adi,ad4857"; | ||
reg = <0>; | ||
spi-max-frequency = <10000000>; | ||
pwms = <&axi_pwm_gen 0 0>; | ||
pwm-names = "cnv"; | ||
vcc-supply = <&vcc>; | ||
vdd-supply = <&vdd>; | ||
vddh-supply = <&vddh>; | ||
vio-supply = <&vio>; | ||
io-backends = <&iio_backend>; | ||
}; | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prepare yourself to justify this attribute :)