162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 262306a36Sopenharmony_ci%YAML 1.2 362306a36Sopenharmony_ci--- 462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/bus/socionext,uniphier-system-bus.yaml# 562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml# 662306a36Sopenharmony_ci 762306a36Sopenharmony_cititle: UniPhier System Bus 862306a36Sopenharmony_ci 962306a36Sopenharmony_cidescription: | 1062306a36Sopenharmony_ci The UniPhier System Bus is an external bus that connects on-board devices to 1162306a36Sopenharmony_ci the UniPhier SoC. It is a simple (semi-)parallel bus with address, data, and 1262306a36Sopenharmony_ci some control signals. It supports up to 8 banks (chip selects). 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci Before any access to the bus, the bus controller must be configured; the bus 1562306a36Sopenharmony_ci controller registers provide the control for the translation from the offset 1662306a36Sopenharmony_ci within each bank to the CPU-viewed address. The needed setup includes the 1762306a36Sopenharmony_ci base address, the size of each bank. Optionally, some timing parameters can 1862306a36Sopenharmony_ci be optimized for faster bus access. 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_cimaintainers: 2162306a36Sopenharmony_ci - Masahiro Yamada <yamada.masahiro@socionext.com> 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ciproperties: 2462306a36Sopenharmony_ci compatible: 2562306a36Sopenharmony_ci const: socionext,uniphier-system-bus 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci reg: 2862306a36Sopenharmony_ci maxItems: 1 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci "#address-cells": 3162306a36Sopenharmony_ci description: | 3262306a36Sopenharmony_ci The first cell is the bank number (chip select). 3362306a36Sopenharmony_ci The second cell is the address offset within the bank. 3462306a36Sopenharmony_ci const: 2 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci "#size-cells": 3762306a36Sopenharmony_ci const: 1 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci ranges: 4062306a36Sopenharmony_ci description: | 4162306a36Sopenharmony_ci Provide address translation from the System Bus to the parent bus. 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci Note: 4462306a36Sopenharmony_ci The address region(s) that can be assigned for the System Bus is 4562306a36Sopenharmony_ci implementation defined. Some SoCs can use 0x00000000-0x0fffffff and 4662306a36Sopenharmony_ci 0x40000000-0x4fffffff, while other SoCs only 0x40000000-0x4fffffff. 4762306a36Sopenharmony_ci There might be additional limitations depending on SoCs and the boot mode. 4862306a36Sopenharmony_ci The address translation is arbitrary as long as the banks are assigned in 4962306a36Sopenharmony_ci the supported address space with the required alignment and they do not 5062306a36Sopenharmony_ci overlap one another. 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci For example, it is possible to map: 5362306a36Sopenharmony_ci bank 0 to 0x42000000-0x43ffffff, bank 5 to 0x46000000-0x46ffffff 5462306a36Sopenharmony_ci It is also possible to map: 5562306a36Sopenharmony_ci bank 0 to 0x48000000-0x49ffffff, bank 5 to 0x44000000-0x44ffffff 5662306a36Sopenharmony_ci There is no reason to stick to a particular translation mapping, but the 5762306a36Sopenharmony_ci "ranges" property should provide a "reasonable" default that is known to 5862306a36Sopenharmony_ci work. The software should initialize the bus controller according to it. 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_cipatternProperties: 6162306a36Sopenharmony_ci "^.*@[1-5],[1-9a-f][0-9a-f]+$": 6262306a36Sopenharmony_ci description: Devices attached to chip selects 6362306a36Sopenharmony_ci type: object 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_cirequired: 6662306a36Sopenharmony_ci - compatible 6762306a36Sopenharmony_ci - reg 6862306a36Sopenharmony_ci - "#address-cells" 6962306a36Sopenharmony_ci - "#size-cells" 7062306a36Sopenharmony_ci - ranges 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ciadditionalProperties: false 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ciexamples: 7562306a36Sopenharmony_ci - | 7662306a36Sopenharmony_ci // In this example, 7762306a36Sopenharmony_ci // - the Ethernet device is connected at the offset 0x01f00000 of CS1 and 7862306a36Sopenharmony_ci // mapped to 0x43f00000 of the parent bus. 7962306a36Sopenharmony_ci // - the UART device is connected at the offset 0x00200000 of CS5 and 8062306a36Sopenharmony_ci // mapped to 0x46200000 of the parent bus. 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci system-bus@58c00000 { 8362306a36Sopenharmony_ci compatible = "socionext,uniphier-system-bus"; 8462306a36Sopenharmony_ci reg = <0x58c00000 0x400>; 8562306a36Sopenharmony_ci #address-cells = <2>; 8662306a36Sopenharmony_ci #size-cells = <1>; 8762306a36Sopenharmony_ci ranges = <1 0x00000000 0x42000000 0x02000000>, 8862306a36Sopenharmony_ci <5 0x00000000 0x46000000 0x01000000>; 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci ethernet@1,1f00000 { 9162306a36Sopenharmony_ci compatible = "smsc,lan9115"; 9262306a36Sopenharmony_ci reg = <1 0x01f00000 0x1000>; 9362306a36Sopenharmony_ci interrupts = <0 48 4>; 9462306a36Sopenharmony_ci phy-mode = "mii"; 9562306a36Sopenharmony_ci }; 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci serial@5,200000 { 9862306a36Sopenharmony_ci compatible = "ns16550a"; 9962306a36Sopenharmony_ci reg = <5 0x00200000 0x20>; 10062306a36Sopenharmony_ci interrupts = <0 49 4>; 10162306a36Sopenharmony_ci clock-frequency = <12288000>; 10262306a36Sopenharmony_ci }; 10362306a36Sopenharmony_ci }; 104