Skip to content
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

Litespi cs handling #4

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9eb0b1f
LiteX: driver for LiteETH network interface
shenki Dec 22, 2020
fddb0b1
LiteX: driver for LiteSPI
fkokosinski Dec 22, 2020
a8e755f
LiteX: driver for LiteSDCard (mmc)
kamilrakoczy Dec 22, 2020
e8c460f
LiteX: add defconfig files for linux-on-litex-rocket design
gsomlo Dec 22, 2020
15ca79a
LiteX: driver for LiteGPIO interface
rw1nkler Dec 22, 2020
f6f825b
fixup over ("LiteX: driver for LiteGPIO interface")
gsomlo Dec 28, 2020
401938f
LiteX: driver for I2CMaster
rw1nkler Dec 22, 2020
0b372a1
fixup over ("LiteX: driver for I2CMaster")
gsomlo Dec 28, 2020
fb24472
LiteX: driver for XADC hwmon
rw1nkler Dec 22, 2020
66d8a9e
fixup over ("LiteX: driver for XADC hwmon")
gsomlo Dec 28, 2020
2b4bc43
LiteX: driver for PWM
craviee Dec 22, 2020
e75f40e
fixup over ("LiteX: driver for PWM")
gsomlo Dec 28, 2020
eff5664
LiteX: driver for SPI Flash (mtd) device
craviee Dec 22, 2020
e1e96eb
fixup over ("LiteX: driver for SPI Flash (mtd) device")
gsomlo Dec 28, 2020
ddff598
dt-bindings: mtd: Fix litex,spiflash
geertu Mar 26, 2021
464aaee
LiteX: driver for ICAPBitstream fpga manager
rw1nkler Dec 22, 2020
1de2b5e
fixup over ("LiteX: driver for ICAPBitstream fpga manager")
gsomlo Dec 27, 2020
36c0889
LiteX: support for VexRiscV interrupt controller
fkokosinski Dec 22, 2020
1398ca7
LiteX: driver for LiteVideo
rw1nkler Dec 22, 2020
e79fccc
fixup over ("LiteX: driver for LiteVideo")
gsomlo Dec 28, 2020
33f271c
LiteX: driver for MMCM
lpawelcz Dec 22, 2020
4869c30
fixup over ("LiteX: driver for MMCM")
gsomlo Dec 27, 2020
6d0adec
dt-bindings: clock: Fix litex,clock
geertu Mar 26, 2021
4a9c51e
litex_mmc: clarify how/why bus-width is configured
gsomlo Jan 11, 2021
94d261d
litex_mmc: don't overwrite capabilities parsed by mmc_of_parse()
gsomlo Jan 11, 2021
19bf4a6
litex-mmc: ensure probe fails with appropriate code & log message
gsomlo Jan 14, 2021
3a07b7d
litex_mmc: align internal error checks to hw. "event register" layout
gsomlo Feb 17, 2021
504079d
litex_mmc: redo max_[seg,req]_size, max_blk_count settings
gsomlo Jan 11, 2021
b0ced35
litex-mmc: enable multi-block data transfers
gsomlo Mar 22, 2021
3480dba
litex_mmc: force single-block data transfers
gsomlo Apr 3, 2021
521ce2b
spi: litespi: fix litespi cs handling for bulk transfers
Mar 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
224 changes: 224 additions & 0 deletions Documentation/devicetree/bindings/clock/litex,clock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/litex,clock.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: LiteX clock control driver

description: |
Common clock driver with MMCM unit for dynamic reconfiguration
of up to 7 clock outputs with ability to change frequency, duty
cycle and phase offset

maintainers:
- Karol Gugala <kgugala@antmicro.com>
- Mateusz Holenko <mholenko@antmicro.com>

properties:
compatible:
const: litex,clock

reg:
description: Base address and lengths of the register space

"#clock-cells":
description:
Number of cells in a clock specifier;
Typically 0 for nodes with a single clock output
and 1 for nodes with multiple clock outputs.
const: 1

"#address-cells":
description:
Number of cells that are needed to form the base address
part in the reg property.
const: 1

"#size-cells":
description:
Used to state how many cells are in each field of a reg property
const: 0

clock-output-names:
description:
List of strings of clock output signal names indexed
by the first cell in the clock specifier.
minItems: 1
maxItems: 7
items:
- const: CLKOUT0
- const: CLKOUT1
- const: CLKOUT2
- const: CLKOUT3
- const: CLKOUT4
- const: CLKOUT5
- const: CLKOUT6

litex,nclkout:
description: Number of desired clock outputs
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 7

litex,lock-timeout:
description: Number of ms to wait for MMCM to assert LOCK signal
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1

litex,drdy-timeout:
description: Number of ms to wait for MMCM to assert DRDY signal
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1

litex,sys-clock-freq:
description: System clock frequency
$ref: /schemas/types.yaml#/definitions/uint32

patternProperties:
"^CLKOUT[0-6]$":
description:
Child node representing configurable clock outputs of MMCM unit
type: object

properties:
compatible:
const: litex,clock

reg:
description: clock output ID, zero-based numbering

litex,clock-frequency:
description: default frequency in Hz for clock output
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1587000
maximum: 100000000

litex,clock-phase:
description: default phase offset given in degrees
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 359

litex,clock-duty-num:
description: default duty cycle numerator value
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 100

litex,clock-duty-den:
description: default duty cycle denominator value
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 100

required:
- compatible
- "#clock-cells"
- clock-output-names
- reg
- litex,clock-frequency
- litex,clock-phase
- litex,clock-duty-num
- litex,clock-duty-den

required:
- compatible
- reg
- "#clock-cells"
- "#address-cells"
- "#size-cells"
- clock-output-names
- litex,nclkout
- CLKOUTx

additionalProperties: false

examples:
- |
clk0: clock-controller@f0003000 {
compatible = "litex,clk";
reg = <0x0 0xf0003000>, <0x0 0x100>;
#clock-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
clock-output-names = "CLKOUT0",
"CLKOUT1",
"CLKOUT2",
"CLKOUT3",
"CLKOUT4",
"CLKOUT5",
"CLKOUT6";
litex,nclkout = <7>;

CLKOUT0: CLKOUT0@0 {
compatible = "litex,clk";
#clock-cells = <0>;
clock-output-names = "CLKOUT0";
reg = <0>;
litex,clock-frequency = <50000000>;
litex,clock-phase = <0>;
litex,clock-duty = <50>;
};

CLKOUT1: CLKOUT1@1 {
compatible = "litex,clk";
#clock-cells = <0>;
clock-output-names = "CLKOUT1";
reg = <1>;
litex,clock-frequency = <50000000>;
litex,clock-phase = <90>;
litex,clock-duty = <50>;
};

CLKOUT2: CLKOUT2@2 {
compatible = "litex,clk";
#clock-cells = <0>;
clock-output-names = "CLKOUT2";
reg = <2>;
litex,clock-frequency = <25000000>;
litex,clock-phase = <0>;
litex,clock-duty = <25>;
};

CLKOUT3: CLKOUT3@3 {
compatible = "litex,clk";
#clock-cells = <0>;
clock-output-names = "CLKOUT3";
reg = <3>;
litex,clock-frequency = <12500000>;
litex,clock-phase = <0>;
litex,clock-duty = <75>;
};

CLKOUT4: CLKOUT4@4 {
compatible = "litex,clk";
#clock-cells = <0>;
clock-output-names = "CLKOUT4";
reg = <4>;
litex,clock-frequency = <6250000>;
litex,clock-phase = <0>;
litex,clock-duty = <50>;
};

CLKOUT5: CLKOUT5@5 {
compatible = "litex,clk";
#clock-cells = <0>;
clock-output-names = "CLKOUT5";
reg = <5>;
litex,clock-frequency = <3125000>;
litex,clock-phase = <0>;
litex,clock-duty = <50>;
};

CLKOUT6: CLKOUT6@6 {
compatible = "litex,clk";
#clock-cells = <0>;
clock-output-names = "CLKOUT6";
reg = <6>;
litex,clock-frequency = <1562500>;
litex,clock-phase = <0>;
litex,clock-duty = <5>;
};
};
...
12 changes: 12 additions & 0 deletions Documentation/devicetree/bindings/fpga/litex-fpga.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
LiteX ICAPBitstream fpga manager

Required properties:
- compatible: should be "litex,fpga-icap"
- reg: base address of configuration registers with length

Examples:

fpga_man: icap@f0007000 {
compatible = "litex,fpga-icap";
reg = <0x0 0xf0007000 0x0 0x14>;
};
23 changes: 23 additions & 0 deletions Documentation/devicetree/bindings/gpio/litex,gpio.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
LiteX GPIO controller

Required properties:
- compatible: should be "litex,gpio"
- reg: base address and length of the register
- litex,ngpio: number of gpio pins in port
- litex,direction: direction of gpio port, should be "in" or "out"

Examples:

gpio@f0003000 {
compatible = "litex,gpio";
reg = <0x0 0xf0003800 0x0 0x1>;
litex,ngpio = <4>;
litex,direction = "in";
};

gpio@f0003800 {
compatible = "litex,gpio";
reg = <0x0 0xf0003800 0x0 0x1>;
litex,ngpio = <4>;
litex,direction = "out";
};
34 changes: 34 additions & 0 deletions Documentation/devicetree/bindings/gpu/litex,litevideo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
DRM LiteX LiteVideo driver

Required properties:
- compatible: should be "litex,litevideo"
- reg: base address of configuration registers with length
- litevideo,pixel-clock: pixel clock frequency in kHz
- litevideo,h-active: horizontal active pixels
- litevideo,h-blanking: total horizontal blanking
- litevideo,h-sync: horizontal sync width
- litevideo,h-front-porch: horizontal front porch
- litevideo,v-active: vertical active pixels
- litevideo,v-blanking: vertical total blanking
- litevideo,v-sync: vertical sync width
- litevideo,v-front-porch: vertical front porch
- litevideo,dma-offset: dma offset in memory
- litevideo,dma-length: size of memory used for storing the image

Examples:

litevideo0: gpu@f0009800 {
compatible = "litex,litevideo";
reg = <0x0 0xf0009800 0x0 0x100>;
litevideo,pixel-clock = <148500>;
litevideo,h-active = <1920>;
litevideo,h-blanking = <280>;
litevideo,h-sync = <44>;
litevideo,h-front-porch = <148>;
litevideo,v-active = <1080>;
litevideo,v-blanking = <45>;
litevideo,v-sync = <5>;
litevideo,v-front-porch = <36>;
litevideo,dma-offset = <0x8000000>;
litevideo,dma-length = <0x7e9000>;
};
12 changes: 12 additions & 0 deletions Documentation/devicetree/bindings/hwmon/litex-hwmon.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
LiteX XADC hwmon controller

Required properties:
- compatible: should be "litex,hwmon-xadc"
- reg: base address of configuration registers with length

Examples:

hwmon@f0003000 {
compatible = "litex,hwmon-xadc";
reg = <0x0 0xf0003000 0x0 0x20>;
};
12 changes: 12 additions & 0 deletions Documentation/devicetree/bindings/i2c/i2c-litex.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
LiteX I2C controller

Required properties:
- compatible: should be "litex,i2c"
- reg: base address of configuration registers with length

Examples:

i2c@f0003000 {
compatible = "litex,i2c";
reg = <0x0 0xf0003000 0x0 0x5>;
};
57 changes: 57 additions & 0 deletions Documentation/devicetree/bindings/mtd/litex,spiflash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# SPDX-License-Identifier: GPL-2.0

%YAML 1.2
---
$id: http://devicetree.org/schemas/mtd/litex,spiflash.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: LiteX SPI Flash controller

maintainers:
- Karol Gugala <kgugala@antmicro.com>
- Mateusz Holenko <mholenko@antmicro.com>

description: |
LiteX SPI Flash controller is a part of LiteX FPGA SoC builder. It supports
multiple CPU architectures, currently including e.g. OpenRISC and RISC-V.

allOf:
- $ref: "/schemas/spi/spi-controller.yaml#"

properties:
compatible:
const: litex,spiflash

reg:
maxItems: 1

interrupts:
maxItems: 1

required:
- compatible
- reg

patternProperties:
"flash@[0-9a-f]+$":
type: object
properties:
compatible:
enum:
- jedec,spi-nor

unevaluatedProperties: false

examples:
- |
spiflash: spi@f0005800 {
compatible = "litex,spiflash";
reg = <0xf0005800 0xc>;
#address-cells = <1>;
#size-cells = <0>;

flash: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
};
};
Loading