Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: bus: Convert UniPhier System Bus to json-schema

Convert the UniPhier System Bus controller binding to DT schema format.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Masahiro Yamada and committed by
Rob Herring
7f44205e 849b1044

+96 -66
+96
Documentation/devicetree/bindings/bus/socionext,uniphier-system-bus.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/bus/socionext,uniphier-system-bus.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: UniPhier System Bus 8 + 9 + description: | 10 + The UniPhier System Bus is an external bus that connects on-board devices to 11 + the UniPhier SoC. It is a simple (semi-)parallel bus with address, data, and 12 + some control signals. It supports up to 8 banks (chip selects). 13 + 14 + Before any access to the bus, the bus controller must be configured; the bus 15 + controller registers provide the control for the translation from the offset 16 + within each bank to the CPU-viewed address. The needed setup includes the 17 + base address, the size of each bank. Optionally, some timing parameters can 18 + be optimized for faster bus access. 19 + 20 + maintainers: 21 + - Masahiro Yamada <yamada.masahiro@socionext.com> 22 + 23 + properties: 24 + compatible: 25 + const: socionext,uniphier-system-bus 26 + 27 + reg: 28 + maxItems: 1 29 + 30 + "#address-cells": 31 + description: | 32 + The first cell is the bank number (chip select). 33 + The second cell is the address offset within the bank. 34 + const: 2 35 + 36 + "#size-cells": 37 + const: 1 38 + 39 + ranges: 40 + description: | 41 + Provide address translation from the System Bus to the parent bus. 42 + 43 + Note: 44 + The address region(s) that can be assigned for the System Bus is 45 + implementation defined. Some SoCs can use 0x00000000-0x0fffffff and 46 + 0x40000000-0x4fffffff, while other SoCs only 0x40000000-0x4fffffff. 47 + There might be additional limitations depending on SoCs and the boot mode. 48 + The address translation is arbitrary as long as the banks are assigned in 49 + the supported address space with the required alignment and they do not 50 + overlap one another. 51 + 52 + For example, it is possible to map: 53 + bank 0 to 0x42000000-0x43ffffff, bank 5 to 0x46000000-0x46ffffff 54 + It is also possible to map: 55 + bank 0 to 0x48000000-0x49ffffff, bank 5 to 0x44000000-0x44ffffff 56 + There is no reason to stick to a particular translation mapping, but the 57 + "ranges" property should provide a "reasonable" default that is known to 58 + work. The software should initialize the bus controller according to it. 59 + 60 + required: 61 + - compatible 62 + - reg 63 + - "#address-cells" 64 + - "#size-cells" 65 + - ranges 66 + 67 + examples: 68 + - | 69 + // In this example, 70 + // - the Ethernet device is connected at the offset 0x01f00000 of CS1 and 71 + // mapped to 0x43f00000 of the parent bus. 72 + // - the UART device is connected at the offset 0x00200000 of CS5 and 73 + // mapped to 0x46200000 of the parent bus. 74 + 75 + system-bus { 76 + compatible = "socionext,uniphier-system-bus"; 77 + reg = <0x58c00000 0x400>; 78 + #address-cells = <2>; 79 + #size-cells = <1>; 80 + ranges = <1 0x00000000 0x42000000 0x02000000>, 81 + <5 0x00000000 0x46000000 0x01000000>; 82 + 83 + ethernet@1,01f00000 { 84 + compatible = "smsc,lan9115"; 85 + reg = <1 0x01f00000 0x1000>; 86 + interrupts = <0 48 4>; 87 + phy-mode = "mii"; 88 + }; 89 + 90 + uart@5,00200000 { 91 + compatible = "ns16550a"; 92 + reg = <5 0x00200000 0x20>; 93 + interrupts = <0 49 4>; 94 + clock-frequency = <12288000>; 95 + }; 96 + };
-66
Documentation/devicetree/bindings/bus/uniphier-system-bus.txt
··· 1 - UniPhier System Bus 2 - 3 - The UniPhier System Bus is an external bus that connects on-board devices to 4 - the UniPhier SoC. It is a simple (semi-)parallel bus with address, data, and 5 - some control signals. It supports up to 8 banks (chip selects). 6 - 7 - Before any access to the bus, the bus controller must be configured; the bus 8 - controller registers provide the control for the translation from the offset 9 - within each bank to the CPU-viewed address. The needed setup includes the base 10 - address, the size of each bank. Optionally, some timing parameters can be 11 - optimized for faster bus access. 12 - 13 - Required properties: 14 - - compatible: should be "socionext,uniphier-system-bus". 15 - - reg: offset and length of the register set for the bus controller device. 16 - - #address-cells: should be 2. The first cell is the bank number (chip select). 17 - The second cell is the address offset within the bank. 18 - - #size-cells: should be 1. 19 - - ranges: should provide a proper address translation from the System Bus to 20 - the parent bus. 21 - 22 - Note: 23 - The address region(s) that can be assigned for the System Bus is implementation 24 - defined. Some SoCs can use 0x00000000-0x0fffffff and 0x40000000-0x4fffffff, 25 - while other SoCs can only use 0x40000000-0x4fffffff. There might be additional 26 - limitations depending on SoCs and the boot mode. The address translation is 27 - arbitrary as long as the banks are assigned in the supported address space with 28 - the required alignment and they do not overlap one another. 29 - For example, it is possible to map: 30 - bank 0 to 0x42000000-0x43ffffff, bank 5 to 0x46000000-0x46ffffff 31 - It is also possible to map: 32 - bank 0 to 0x48000000-0x49ffffff, bank 5 to 0x44000000-0x44ffffff 33 - There is no reason to stick to a particular translation mapping, but the 34 - "ranges" property should provide a "reasonable" default that is known to work. 35 - The software should initialize the bus controller according to it. 36 - 37 - Example: 38 - 39 - system-bus { 40 - compatible = "socionext,uniphier-system-bus"; 41 - reg = <0x58c00000 0x400>; 42 - #address-cells = <2>; 43 - #size-cells = <1>; 44 - ranges = <1 0x00000000 0x42000000 0x02000000 45 - 5 0x00000000 0x46000000 0x01000000>; 46 - 47 - ethernet@1,01f00000 { 48 - compatible = "smsc,lan9115"; 49 - reg = <1 0x01f00000 0x1000>; 50 - interrupts = <0 48 4> 51 - phy-mode = "mii"; 52 - }; 53 - 54 - uart@5,00200000 { 55 - compatible = "ns16550a"; 56 - reg = <5 0x00200000 0x20>; 57 - interrupts = <0 49 4> 58 - clock-frequency = <12288000>; 59 - }; 60 - }; 61 - 62 - In this example, 63 - - the Ethernet device is connected at the offset 0x01f00000 of CS1 and 64 - mapped to 0x43f00000 of the parent bus. 65 - - the UART device is connected at the offset 0x00200000 of CS5 and 66 - mapped to 0x46200000 of the parent bus.