1cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2cb7aa33aSEmmanuel Vadot%YAML 1.2
3cb7aa33aSEmmanuel Vadot---
4cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/memory-controllers/intel,ixp4xx-expansion-bus-controller.yaml#
5cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6cb7aa33aSEmmanuel Vadot
7cb7aa33aSEmmanuel Vadottitle: Intel IXP4xx Expansion Bus Controller
8cb7aa33aSEmmanuel Vadot
9cb7aa33aSEmmanuel Vadotdescription: |
10cb7aa33aSEmmanuel Vadot  The IXP4xx expansion bus controller handles access to devices on the
11cb7aa33aSEmmanuel Vadot  memory-mapped expansion bus on the Intel IXP4xx family of system on chips,
12cb7aa33aSEmmanuel Vadot  including IXP42x, IXP43x, IXP45x and IXP46x.
13cb7aa33aSEmmanuel Vadot
14cb7aa33aSEmmanuel Vadotmaintainers:
15cb7aa33aSEmmanuel Vadot  - Linus Walleij <linus.walleij@linaro.org>
16cb7aa33aSEmmanuel Vadot
17cb7aa33aSEmmanuel Vadotproperties:
18cb7aa33aSEmmanuel Vadot  $nodename:
19cb7aa33aSEmmanuel Vadot    pattern: '^bus@[0-9a-f]+$'
20cb7aa33aSEmmanuel Vadot
21cb7aa33aSEmmanuel Vadot  compatible:
22cb7aa33aSEmmanuel Vadot    items:
23cb7aa33aSEmmanuel Vadot      - enum:
24cb7aa33aSEmmanuel Vadot          - intel,ixp42x-expansion-bus-controller
25cb7aa33aSEmmanuel Vadot          - intel,ixp43x-expansion-bus-controller
26cb7aa33aSEmmanuel Vadot          - intel,ixp45x-expansion-bus-controller
27cb7aa33aSEmmanuel Vadot          - intel,ixp46x-expansion-bus-controller
28cb7aa33aSEmmanuel Vadot      - const: syscon
29cb7aa33aSEmmanuel Vadot
30cb7aa33aSEmmanuel Vadot  reg:
31cb7aa33aSEmmanuel Vadot    description: Control registers for the expansion bus, these are not
32cb7aa33aSEmmanuel Vadot      inside the memory range handled by the expansion bus.
33cb7aa33aSEmmanuel Vadot    maxItems: 1
34cb7aa33aSEmmanuel Vadot
35cb7aa33aSEmmanuel Vadot  native-endian:
36cb7aa33aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
37cb7aa33aSEmmanuel Vadot    description: The IXP4xx has a peculiar MMIO access scheme, as it changes
38cb7aa33aSEmmanuel Vadot      the access pattern for words (swizzling) on the bus depending on whether
39cb7aa33aSEmmanuel Vadot      the SoC is running in big-endian or little-endian mode. Thus the
40cb7aa33aSEmmanuel Vadot      registers must always be accessed using native endianness.
41cb7aa33aSEmmanuel Vadot
42cb7aa33aSEmmanuel Vadot  "#address-cells":
43cb7aa33aSEmmanuel Vadot    description: |
44cb7aa33aSEmmanuel Vadot      The first cell is the chip select number.
45cb7aa33aSEmmanuel Vadot      The second cell is the address offset within the bank.
46cb7aa33aSEmmanuel Vadot    const: 2
47cb7aa33aSEmmanuel Vadot
48cb7aa33aSEmmanuel Vadot  "#size-cells":
49cb7aa33aSEmmanuel Vadot    const: 1
50cb7aa33aSEmmanuel Vadot
51cb7aa33aSEmmanuel Vadot  ranges: true
52cb7aa33aSEmmanuel Vadot  dma-ranges: true
53cb7aa33aSEmmanuel Vadot
54cb7aa33aSEmmanuel VadotpatternProperties:
55cb7aa33aSEmmanuel Vadot  "^.*@[0-7],[0-9a-f]+$":
56cb7aa33aSEmmanuel Vadot    description: Devices attached to chip selects are represented as
57cb7aa33aSEmmanuel Vadot      subnodes.
58cb7aa33aSEmmanuel Vadot    type: object
59cb7aa33aSEmmanuel Vadot    $ref: /schemas/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml#
60*fac71e4eSEmmanuel Vadot    additionalProperties: true
61cb7aa33aSEmmanuel Vadot
62cb7aa33aSEmmanuel Vadotrequired:
63cb7aa33aSEmmanuel Vadot  - compatible
64cb7aa33aSEmmanuel Vadot  - reg
65cb7aa33aSEmmanuel Vadot  - native-endian
66cb7aa33aSEmmanuel Vadot  - "#address-cells"
67cb7aa33aSEmmanuel Vadot  - "#size-cells"
68cb7aa33aSEmmanuel Vadot  - ranges
69cb7aa33aSEmmanuel Vadot  - dma-ranges
70cb7aa33aSEmmanuel Vadot
71cb7aa33aSEmmanuel VadotadditionalProperties: false
72cb7aa33aSEmmanuel Vadot
73cb7aa33aSEmmanuel Vadotexamples:
74cb7aa33aSEmmanuel Vadot  - |
75cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
76cb7aa33aSEmmanuel Vadot    bus@50000000 {
77cb7aa33aSEmmanuel Vadot        compatible = "intel,ixp42x-expansion-bus-controller", "syscon";
78cb7aa33aSEmmanuel Vadot        reg = <0xc4000000 0x28>;
79cb7aa33aSEmmanuel Vadot        native-endian;
80cb7aa33aSEmmanuel Vadot        #address-cells = <2>;
81cb7aa33aSEmmanuel Vadot        #size-cells = <1>;
82cb7aa33aSEmmanuel Vadot        ranges = <0 0x0 0x50000000 0x01000000>,
83cb7aa33aSEmmanuel Vadot                 <1 0x0 0x51000000 0x01000000>;
84cb7aa33aSEmmanuel Vadot        dma-ranges = <0 0x0 0x50000000 0x01000000>,
85cb7aa33aSEmmanuel Vadot                     <1 0x0 0x51000000 0x01000000>;
86cb7aa33aSEmmanuel Vadot        flash@0,0 {
87cb7aa33aSEmmanuel Vadot            compatible = "intel,ixp4xx-flash", "cfi-flash";
88cb7aa33aSEmmanuel Vadot            bank-width = <2>;
89cb7aa33aSEmmanuel Vadot            reg = <0 0x00000000 0x1000000>;
90cb7aa33aSEmmanuel Vadot            intel,ixp4xx-eb-t3 = <3>;
91cb7aa33aSEmmanuel Vadot            intel,ixp4xx-eb-cycle-type = <0>;
92cb7aa33aSEmmanuel Vadot            intel,ixp4xx-eb-byte-access-on-halfword = <1>;
93cb7aa33aSEmmanuel Vadot            intel,ixp4xx-eb-write-enable = <1>;
94cb7aa33aSEmmanuel Vadot            intel,ixp4xx-eb-byte-access = <0>;
95cb7aa33aSEmmanuel Vadot        };
96cb7aa33aSEmmanuel Vadot        serial@1,0 {
97cb7aa33aSEmmanuel Vadot            compatible = "exar,xr16l2551", "ns8250";
98cb7aa33aSEmmanuel Vadot            reg = <1 0x00000000 0x10>;
99cb7aa33aSEmmanuel Vadot            interrupt-parent = <&gpio0>;
100cb7aa33aSEmmanuel Vadot            interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
101cb7aa33aSEmmanuel Vadot            clock-frequency = <1843200>;
102cb7aa33aSEmmanuel Vadot            intel,ixp4xx-eb-t3 = <3>;
103cb7aa33aSEmmanuel Vadot            intel,ixp4xx-eb-cycle-type = <1>;
104cb7aa33aSEmmanuel Vadot            intel,ixp4xx-eb-write-enable = <1>;
105cb7aa33aSEmmanuel Vadot            intel,ixp4xx-eb-byte-access = <1>;
106cb7aa33aSEmmanuel Vadot        };
107cb7aa33aSEmmanuel Vadot    };
108