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

Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC late DT updates from Arnd Bergmann:
"These updates have been kept in a separate branch mostly because they
rely on updates to the respective clk drivers to keep the shared
header files in sync.

- The Renesas r8a7796 (R-Car M3-W) platform gets added, this is an
automotive SoC similar to the ⅹ8a7795 chip we already support, but
the dts changes rely on a clock driver change that has been merged
for v4.9 through the clk tree.

- The Amlogic meson-gxbb (S905) platform gains support for a few
drivers merged through our tree, in particular the network and usb
driver changes are required and included here, and also the clk
tree changes.

- The Allwinner platforms have seen a large-scale change to their clk
drivers and the dts file updates must come after that. This
includes the newly added Nextthing GR8 platform, which is derived
from sun5i/A13.

- Some integrator (arm32) changes rely on clk driver changes.

- A single patch for lpc32xx has no such dependency but wasn't added
until just before the merge window"

* tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (99 commits)
ARM: dts: lpc32xx: add device node for IRAM on-chip memory
ARM: dts: sun8i: Add accelerometer to polaroid-mid2407pxe03
ARM: dts: sun8i: enable UART1 for iNet D978 Rev2 board
ARM: dts: sun8i: add pinmux for UART1 at PG
dts: sun8i-h3: add I2C0-2 peripherals to H3 SOC
dts: sun8i-h3: add pinmux definitions for I2C0-2
dts: sun8i-h3: associate exposed UARTs on Orange Pi Boards
dts: sun8i-h3: split off RTS/CTS for UART1 in seperate pinmux
dts: sun8i-h3: add pinmux definitions for UART2-3
ARM: dts: sun9i: a80-optimus: Disable EHCI1
ARM: dts: sun9i: cubieboard4: Add AXP806 PMIC device node and regulators
ARM: dts: sun9i: a80-optimus: Add AXP806 PMIC device node and regulators
ARM: dts: sun9i: cubieboard4: Declare AXP809 SW regulator as unused
ARM: dts: sun9i: a80-optimus: Declare AXP809 SW regulator as unused
ARM: dts: sun8i: Add touchscreen node for sun8i-a33-ga10h
ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2809pxe04
ARM: dts: sun8i: Add touchscreen node for sun8i-a23-polaroid-mid2407pxe03
ARM: dts: sun8i: Add touchscreen node for sun8i-a23-inet86dz
ARM: dts: sun8i: Add touchscreen node for sun8i-a23-gt90h
ARM64: dts: meson-gxbb-vega-s95: Enable USB Nodes
...

+4157 -874
+2
Documentation/devicetree/bindings/arm/shmobile.txt
··· 49 49 compatible = "renesas,genmai", "renesas,r7s72100" 50 50 - Gose 51 51 compatible = "renesas,gose", "renesas,r8a7793" 52 + - H3ULCB (RTP0RC7795SKB00010S) 53 + compatible = "renesas,h3ulcb", "renesas,r8a7795"; 52 54 - Henninger 53 55 compatible = "renesas,henninger", "renesas,r8a7791" 54 56 - Koelsch (RTP0RC7791SEB00010S)
+15
Documentation/devicetree/bindings/firmware/meson/meson_sm.txt
··· 1 + * Amlogic Secure Monitor 2 + 3 + In the Amlogic SoCs the Secure Monitor code is used to provide access to the 4 + NVMEM, enable JTAG, set USB boot, etc... 5 + 6 + Required properties for the secure monitor node: 7 + - compatible: Should be "amlogic,meson-gxbb-sm" 8 + 9 + Example: 10 + 11 + firmware { 12 + sm: secure-monitor { 13 + compatible = "amlogic,meson-gxbb-sm"; 14 + }; 15 + };
+4 -1
Documentation/devicetree/bindings/media/meson-ir.txt
··· 1 1 * Amlogic Meson IR remote control receiver 2 2 3 3 Required properties: 4 - - compatible : should be "amlogic,meson6-ir" 4 + - compatible : depending on the platform this should be one of: 5 + - "amlogic,meson6-ir" 6 + - "amlogic,meson8b-ir" 7 + - "amlogic,meson-gxbb-ir" 5 8 - reg : physical base address and length of the device registers 6 9 - interrupts : a single specifier for the interrupt from the device 7 10
+37 -8
Documentation/devicetree/bindings/net/meson-dwmac.txt
··· 1 1 * Amlogic Meson DWMAC Ethernet controller 2 2 3 3 The device inherits all the properties of the dwmac/stmmac devices 4 - described in the file net/stmmac.txt with the following changes. 4 + described in the file stmmac.txt in the current directory with the 5 + following changes. 5 6 6 - Required properties: 7 + Required properties on all platforms: 7 8 8 - - compatible: should be "amlogic,meson6-dwmac" along with "snps,dwmac" 9 - and any applicable more detailed version number 10 - described in net/stmmac.txt 9 + - compatible: Depending on the platform this should be one of: 10 + - "amlogic,meson6-dwmac" 11 + - "amlogic,meson8b-dwmac" 12 + - "amlogic,meson-gxbb-dwmac" 13 + Additionally "snps,dwmac" and any applicable more 14 + detailed version number described in net/stmmac.txt 15 + should be used. 11 16 12 - - reg: should contain a register range for the dwmac controller and 13 - another one for the Amlogic specific configuration 17 + - reg: The first register range should be the one of the DWMAC 18 + controller. The second range is is for the Amlogic specific 19 + configuration (for example the PRG_ETHERNET register range 20 + on Meson8b and newer) 14 21 15 - Example: 22 + Required properties on Meson8b and newer: 23 + - clock-names: Should contain the following: 24 + - "stmmaceth" - see stmmac.txt 25 + - "clkin0" - first parent clock of the internal mux 26 + - "clkin1" - second parent clock of the internal mux 27 + 28 + 29 + Example for Meson6: 16 30 17 31 ethmac: ethernet@c9410000 { 18 32 compatible = "amlogic,meson6-dwmac", "snps,dwmac"; ··· 37 23 clocks = <&clk81>; 38 24 clock-names = "stmmaceth"; 39 25 } 26 + 27 + Example for GXBB: 28 + ethmac: ethernet@c9410000 { 29 + compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac"; 30 + reg = <0x0 0xc9410000 0x0 0x10000>, 31 + <0x0 0xc8834540 0x0 0x8>; 32 + interrupts = <0 8 1>; 33 + interrupt-names = "macirq"; 34 + clocks = <&clkc CLKID_ETH>, 35 + <&clkc CLKID_FCLK_DIV2>, 36 + <&clkc CLKID_MPLL2>; 37 + clock-names = "stmmaceth", "clkin0", "clkin1"; 38 + phy-mode = "rgmii"; 39 + status = "disabled"; 40 + };
+39
Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
··· 1 + = Amlogic eFuse device tree bindings = 2 + 3 + Required properties: 4 + - compatible: should be "amlogic,meson-gxbb-efuse" 5 + 6 + = Data cells = 7 + Are child nodes of eFuse, bindings of which as described in 8 + bindings/nvmem/nvmem.txt 9 + 10 + Example: 11 + 12 + efuse: efuse { 13 + compatible = "amlogic,meson-gxbb-efuse"; 14 + #address-cells = <1>; 15 + #size-cells = <1>; 16 + 17 + sn: sn@14 { 18 + reg = <0x14 0x10>; 19 + }; 20 + 21 + eth_mac: eth_mac@34 { 22 + reg = <0x34 0x10>; 23 + }; 24 + 25 + bid: bid@46 { 26 + reg = <0x46 0x30>; 27 + }; 28 + }; 29 + 30 + = Data consumers = 31 + Are device nodes which consume nvmem data cells. 32 + 33 + For example: 34 + 35 + eth_mac { 36 + ... 37 + nvmem-cells = <&eth_mac>; 38 + nvmem-cell-names = "eth_mac"; 39 + };
+27
Documentation/devicetree/bindings/phy/meson-usb2-phy.txt
··· 1 + * Amlogic USB2 PHY 2 + 3 + Required properties: 4 + - compatible: Depending on the platform this should be one of: 5 + "amlogic,meson8b-usb2-phy" 6 + "amlogic,meson-gxbb-usb2-phy" 7 + - reg: The base address and length of the registers 8 + - #phys-cells: should be 0 (see phy-bindings.txt in this directory) 9 + - clocks: phandle and clock identifier for the phy clocks 10 + - clock-names: "usb_general" and "usb" 11 + 12 + Optional properties: 13 + - resets: reference to the reset controller 14 + - phy-supply: see phy-bindings.txt in this directory 15 + 16 + 17 + Example: 18 + 19 + usb0_phy: usb_phy@0 { 20 + compatible = "amlogic,meson-gxbb-usb2-phy"; 21 + #phy-cells = <0>; 22 + reg = <0x0 0x0 0x0 0x20>; 23 + resets = <&reset RESET_USB_OTG>; 24 + clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>; 25 + clock-names = "usb_general", "usb"; 26 + phy-supply = <&usb_vbus>; 27 + };
+2
Documentation/devicetree/bindings/usb/dwc2.txt
··· 10 10 - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc; 11 11 - "lantiq,arx100-usb": The DWC2 USB controller instance in Lantiq ARX SoCs; 12 12 - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs; 13 + - "amlogic,meson8b-usb": The DWC2 USB controller instance in Amlogic Meson8b SoCs; 14 + - "amlogic,meson-gxbb-usb": The DWC2 USB controller instance in Amlogic S905 SoCs; 13 15 - snps,dwc2: A generic DWC2 USB controller with default parameters. 14 16 - reg : Should contain 1 register range (address and length) 15 17 - interrupts : Should contain 1 interrupt
+1
arch/arm/boot/dts/Makefile
··· 745 745 sun4i-a10-pcduino2.dtb \ 746 746 sun4i-a10-pov-protab2-ips9.dtb 747 747 dtb-$(CONFIG_MACH_SUN5I) += \ 748 + ntc-gr8-evb.dtb \ 748 749 sun5i-a10s-auxtek-t003.dtb \ 749 750 sun5i-a10s-auxtek-t004.dtb \ 750 751 sun5i-a10s-mk802.dtb \
+50 -1
arch/arm/boot/dts/integratorap.dts
··· 19 19 bootargs = "root=/dev/ram0 console=ttyAM0,38400n8 earlyprintk"; 20 20 }; 21 21 22 - /* 24 MHz chrystal on the core module */ 22 + /* 24 MHz chrystal on the Integrator/AP development board */ 23 23 xtal24mhz: xtal24mhz@24M { 24 24 #clock-cells = <0>; 25 25 compatible = "fixed-clock"; ··· 39 39 #clock-cells = <0>; 40 40 compatible = "fixed-clock"; 41 41 clock-frequency = <14745600>; 42 + clocks = <&xtal24mhz>; 43 + }; 44 + 45 + core-module@10000000 { 46 + /* 24 MHz chrystal on the core module */ 47 + cm24mhz: cm24mhz@24M { 48 + #clock-cells = <0>; 49 + compatible = "fixed-clock"; 50 + clock-frequency = <24000000>; 51 + }; 52 + 53 + /* Oscillator on the core module, clocks the CPU core */ 54 + cmosc: cmosc@24M { 55 + compatible = "arm,syscon-icst525-integratorap-cm"; 56 + #clock-cells = <0>; 57 + lock-offset = <0x14>; 58 + vco-offset = <0x08>; 59 + clocks = <&cm24mhz>; 60 + }; 61 + 62 + /* Auxilary oscillator on the core module, 32.369MHz at boot */ 63 + auxosc: auxosc@24M { 64 + compatible = "arm,syscon-icst525"; 65 + #clock-cells = <0>; 66 + lock-offset = <0x14>; 67 + vco-offset = <0x1c>; 68 + clocks = <&cm24mhz>; 69 + }; 42 70 }; 43 71 44 72 syscon { ··· 75 47 interrupt-parent = <&pic>; 76 48 /* These are the logical module IRQs */ 77 49 interrupts = <9>, <10>, <11>, <12>; 50 + 51 + /* 52 + * SYSCLK clocks PCIv3 bridge, system controller and the 53 + * logic modules. 54 + */ 55 + sysclk: apsys@24M { 56 + compatible = "arm,syscon-icst525-integratorap-sys"; 57 + #clock-cells = <0>; 58 + lock-offset = <0x1c>; 59 + vco-offset = <0x04>; 60 + clocks = <&xtal24mhz>; 61 + }; 62 + 63 + /* One-bit control for the PCI bus clock (33 or 25 MHz) */ 64 + pciclk: pciclk@24M { 65 + compatible = "arm,syscon-icst525-integratorap-pci"; 66 + #clock-cells = <0>; 67 + lock-offset = <0x1c>; 68 + vco-offset = <0x04>; 69 + clocks = <&xtal24mhz>; 70 + }; 78 71 }; 79 72 80 73 timer0: timer@13000000 {
+63 -11
arch/arm/boot/dts/integratorcp.dts
··· 58 58 59 59 core-module@10000000 { 60 60 /* 24 MHz chrystal on the core module */ 61 - xtal24mhz: xtal24mhz@24M { 61 + cm24mhz: cm24mhz@24M { 62 62 #clock-cells = <0>; 63 63 compatible = "fixed-clock"; 64 64 clock-frequency = <24000000>; 65 65 }; 66 66 67 - /* 68 - * External oscillator on the core module, usually used 69 - * to drive video circuitry. Driven from the 24MHz clock. 70 - */ 71 - auxosc: cm_aux_osc@25M { 67 + /* Oscillator on the core module, clocks the CPU core */ 68 + cmcore: cmosc@24M { 69 + compatible = "arm,syscon-icst525-integratorcp-cm-core"; 72 70 #clock-cells = <0>; 73 - compatible = "arm,integrator-cm-auxosc"; 74 - clocks = <&xtal24mhz>; 71 + lock-offset = <0x14>; 72 + vco-offset = <0x08>; 73 + clocks = <&cm24mhz>; 74 + }; 75 + 76 + /* Oscillator on the core module, clocks the memory bus */ 77 + cmmem: cmosc@24M { 78 + compatible = "arm,syscon-icst525-integratorcp-cm-mem"; 79 + #clock-cells = <0>; 80 + lock-offset = <0x14>; 81 + vco-offset = <0x08>; 82 + clocks = <&cm24mhz>; 83 + }; 84 + 85 + /* Auxilary oscillator on the core module, clocks the CLCD */ 86 + auxosc: auxosc@24M { 87 + compatible = "arm,syscon-icst525"; 88 + #clock-cells = <0>; 89 + lock-offset = <0x14>; 90 + vco-offset = <0x1c>; 91 + clocks = <&cm24mhz>; 75 92 }; 76 93 77 94 /* The KMI clock is the 24 MHz oscillator divided to 8MHz */ ··· 97 80 compatible = "fixed-factor-clock"; 98 81 clock-div = <3>; 99 82 clock-mult = <1>; 100 - clocks = <&xtal24mhz>; 83 + clocks = <&cm24mhz>; 101 84 }; 102 85 103 86 /* The timer clock is the 24 MHz oscillator divided to 1MHz */ ··· 106 89 compatible = "fixed-factor-clock"; 107 90 clock-div = <24>; 108 91 clock-mult = <1>; 109 - clocks = <&xtal24mhz>; 92 + clocks = <&cm24mhz>; 110 93 }; 111 94 }; 112 95 ··· 226 209 reg = <0xC0000000 0x1000>; 227 210 interrupts = <22>; 228 211 clocks = <&auxosc>, <&pclk>; 229 - clock-names = "clcd", "apb_pclk"; 212 + clock-names = "clcdclk", "apb_pclk"; 213 + 214 + port { 215 + /* 216 + * The VGA connected is implemented with a 217 + * THS8134A triple DAC that can be run in 24bit 218 + * or 16bit RGB mode. 219 + */ 220 + clcd_pads: endpoint { 221 + remote-endpoint = <&clcd_panel>; 222 + arm,pl11x,tft-r0g0b0-pads = <1 7 13>; 223 + }; 224 + }; 225 + 226 + panel { 227 + compatible = "panel-dpi"; 228 + 229 + port { 230 + clcd_panel: endpoint { 231 + remote-endpoint = <&clcd_pads>; 232 + }; 233 + }; 234 + 235 + /* Standard 640x480 VGA timings */ 236 + panel-timing { 237 + clock-frequency = <25175000>; 238 + hactive = <640>; 239 + hback-porch = <48>; 240 + hfront-porch = <16>; 241 + hsync-len = <96>; 242 + vactive = <480>; 243 + vback-porch = <33>; 244 + vfront-porch = <10>; 245 + vsync-len = <2>; 246 + }; 247 + }; 230 248 }; 231 249 }; 232 250 };
+11 -1
arch/arm/boot/dts/lpc32xx.dtsi
··· 51 51 #address-cells = <1>; 52 52 #size-cells = <1>; 53 53 compatible = "simple-bus"; 54 - ranges = <0x20000000 0x20000000 0x30000000>, 54 + ranges = <0x00000000 0x00000000 0x10000000>, 55 + <0x20000000 0x20000000 0x30000000>, 55 56 <0xe0000000 0xe0000000 0x04000000>; 57 + 58 + iram: sram@08000000 { 59 + compatible = "mmio-sram"; 60 + reg = <0x08000000 0x20000>; 61 + 62 + #address-cells = <1>; 63 + #size-cells = <1>; 64 + ranges = <0x00000000 0x08000000 0x20000>; 65 + }; 56 66 57 67 /* 58 68 * Enable either SLC or MLC
+342
arch/arm/boot/dts/ntc-gr8-evb.dts
··· 1 + /* 2 + * Copyright 2016 Free Electrons 3 + * Copyright 2016 NextThing Co 4 + * 5 + * Mylène Josserand <mylene.josserand@free-electrons.com> 6 + * 7 + * This file is dual-licensed: you can use it either under the terms 8 + * of the GPL or the X11 license, at your option. Note that this dual 9 + * licensing only applies to this file, and not this project as a 10 + * whole. 11 + * 12 + * a) This file is free software; you can redistribute it and/or 13 + * modify it under the terms of the GNU General Public License as 14 + * published by the Free Software Foundation; either version 2 of the 15 + * License, or (at your option) any later version. 16 + * 17 + * This file is distributed in the hope that it will be useful, 18 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 + * GNU General Public License for more details. 21 + * 22 + * Or, alternatively, 23 + * 24 + * b) Permission is hereby granted, free of charge, to any person 25 + * obtaining a copy of this software and associated documentation 26 + * files (the "Software"), to deal in the Software without 27 + * restriction, including without limitation the rights to use, 28 + * copy, modify, merge, publish, distribute, sublicense, and/or 29 + * sell copies of the Software, and to permit persons to whom the 30 + * Software is furnished to do so, subject to the following 31 + * conditions: 32 + * 33 + * The above copyright notice and this permission notice shall be 34 + * included in all copies or substantial portions of the Software. 35 + * 36 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 37 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 38 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 39 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 40 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 41 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 42 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 43 + * OTHER DEALINGS IN THE SOFTWARE. 44 + */ 45 + 46 + /dts-v1/; 47 + #include "ntc-gr8.dtsi" 48 + #include "sunxi-common-regulators.dtsi" 49 + 50 + #include <dt-bindings/gpio/gpio.h> 51 + #include <dt-bindings/input/input.h> 52 + #include <dt-bindings/interrupt-controller/irq.h> 53 + 54 + / { 55 + model = "NextThing GR8-EVB"; 56 + compatible = "nextthing,gr8-evb", "nextthing,gr8"; 57 + 58 + aliases { 59 + i2c0 = &i2c0; 60 + i2c1 = &i2c1; 61 + i2c2 = &i2c2; 62 + serial0 = &uart1; 63 + serial1 = &uart2; 64 + }; 65 + 66 + chosen { 67 + stdout-path = "serial0:115200n8"; 68 + }; 69 + 70 + backlight: backlight { 71 + compatible = "pwm-backlight"; 72 + pwms = <&pwm 0 10000 0>; 73 + enable-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>; 74 + 75 + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; 76 + default-brightness-level = <8>; 77 + }; 78 + }; 79 + 80 + &be0 { 81 + status = "okay"; 82 + }; 83 + 84 + &codec { 85 + status = "okay"; 86 + }; 87 + 88 + &ehci0 { 89 + status = "okay"; 90 + }; 91 + 92 + &i2c0 { 93 + pinctrl-names = "default"; 94 + pinctrl-0 = <&i2c0_pins_a>; 95 + status = "okay"; 96 + 97 + axp209: pmic@34 { 98 + reg = <0x34>; 99 + 100 + /* 101 + * The interrupt is routed through the "External Fast 102 + * Interrupt Request" pin (ball G13 of the module) 103 + * directly to the main interrupt controller, without 104 + * any other controller interfering. 105 + */ 106 + interrupts = <0>; 107 + }; 108 + }; 109 + 110 + #include "axp209.dtsi" 111 + 112 + &i2c1 { 113 + pinctrl-names = "default"; 114 + pinctrl-0 = <&i2c1_pins_a>; 115 + status = "okay"; 116 + 117 + wm8978: codec@1a { 118 + #sound-dai-cells = <0>; 119 + compatible = "wlf,wm8978"; 120 + reg = <0x1a>; 121 + }; 122 + 123 + pcf8563: rtc@51 { 124 + compatible = "phg,pcf8563"; 125 + reg = <0x51>; 126 + }; 127 + }; 128 + 129 + &i2c2 { 130 + pinctrl-names = "default"; 131 + pinctrl-0 = <&i2c2_pins_a>; 132 + status = "okay"; 133 + }; 134 + 135 + &i2s0 { 136 + pinctrl-names = "default"; 137 + pinctrl-0 = <&i2s0_mclk_pins_a>, <&i2s0_data_pins_a>; 138 + status = "okay"; 139 + }; 140 + 141 + &ir0 { 142 + pinctrl-names = "default"; 143 + pinctrl-0 = <&ir0_rx_pins_a>; 144 + status = "okay"; 145 + }; 146 + 147 + &lradc { 148 + vref-supply = <&reg_ldo2>; 149 + status = "okay"; 150 + 151 + button@190 { 152 + label = "Volume Up"; 153 + linux,code = <KEY_VOLUMEUP>; 154 + channel = <0>; 155 + voltage = <190000>; 156 + }; 157 + 158 + button@390 { 159 + label = "Volume Down"; 160 + linux,code = <KEY_VOLUMEDOWN>; 161 + channel = <0>; 162 + voltage = <390000>; 163 + }; 164 + 165 + button@600 { 166 + label = "Menu"; 167 + linux,code = <KEY_MENU>; 168 + channel = <0>; 169 + voltage = <600000>; 170 + }; 171 + 172 + button@800 { 173 + label = "Search"; 174 + linux,code = <KEY_SEARCH>; 175 + channel = <0>; 176 + voltage = <800000>; 177 + }; 178 + 179 + button@980 { 180 + label = "Home"; 181 + linux,code = <KEY_HOMEPAGE>; 182 + channel = <0>; 183 + voltage = <980000>; 184 + }; 185 + 186 + button@1180 { 187 + label = "Esc"; 188 + linux,code = <KEY_ESC>; 189 + channel = <0>; 190 + voltage = <1180000>; 191 + }; 192 + 193 + button@1400 { 194 + label = "Enter"; 195 + linux,code = <KEY_ENTER>; 196 + channel = <0>; 197 + voltage = <1400000>; 198 + }; 199 + }; 200 + 201 + &mmc0 { 202 + pinctrl-names = "default"; 203 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_gr8_evb>; 204 + vmmc-supply = <&reg_vcc3v3>; 205 + bus-width = <4>; 206 + cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */ 207 + cd-inverted; 208 + status = "okay"; 209 + }; 210 + 211 + &nfc { 212 + pinctrl-names = "default"; 213 + pinctrl-0 = <&nand_pins_a &nand_cs0_pins_a &nand_rb0_pins_a>; 214 + 215 + /* MLC Support sucks for now */ 216 + status = "disabled"; 217 + }; 218 + 219 + &ohci0 { 220 + status = "okay"; 221 + }; 222 + 223 + &otg_sram { 224 + status = "okay"; 225 + }; 226 + 227 + &pio { 228 + mmc0_cd_pin_gr8_evb: mmc0-cd-pin@0 { 229 + allwinner,pins = "PG0"; 230 + allwinner,function = "gpio_in"; 231 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 232 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 233 + }; 234 + 235 + usb0_id_pin_gr8_evb: usb0-id-pin@0 { 236 + allwinner,pins = "PG2"; 237 + allwinner,function = "gpio_in"; 238 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 239 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 240 + }; 241 + 242 + usb0_vbus_det_pin_gr8_evb: usb0-vbus-det-pin@0 { 243 + allwinner,pins = "PG1"; 244 + allwinner,function = "gpio_in"; 245 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 246 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 247 + }; 248 + 249 + usb1_vbus_pin_gr8_evb: usb1-vbus-pin@0 { 250 + allwinner,pins = "PG13"; 251 + allwinner,function = "gpio_out"; 252 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 253 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 254 + }; 255 + }; 256 + 257 + &pwm { 258 + pinctrl-names = "default"; 259 + pinctrl-0 = <&pwm0_pins_a>; 260 + status = "okay"; 261 + }; 262 + 263 + &reg_dcdc2 { 264 + regulator-min-microvolt = <1000000>; 265 + regulator-max-microvolt = <1400000>; 266 + regulator-name = "vdd-cpu"; 267 + regulator-always-on; 268 + }; 269 + 270 + &reg_dcdc3 { 271 + regulator-min-microvolt = <1000000>; 272 + regulator-max-microvolt = <1300000>; 273 + regulator-name = "vdd-sys"; 274 + regulator-always-on; 275 + }; 276 + 277 + &reg_ldo1 { 278 + regulator-name = "vdd-rtc"; 279 + }; 280 + 281 + &reg_ldo2 { 282 + regulator-min-microvolt = <2700000>; 283 + regulator-max-microvolt = <3300000>; 284 + regulator-name = "avcc"; 285 + regulator-always-on; 286 + }; 287 + 288 + &reg_usb1_vbus { 289 + pinctrl-0 = <&usb1_vbus_pin_gr8_evb>; 290 + gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>; 291 + status = "okay"; 292 + }; 293 + 294 + &rtp { 295 + allwinner,ts-attached; 296 + }; 297 + 298 + &spdif { 299 + pinctrl-names = "default"; 300 + pinctrl-0 = <&spdif_tx_pins_a>; 301 + status = "okay"; 302 + }; 303 + 304 + &tve0 { 305 + status = "okay"; 306 + }; 307 + 308 + &uart1 { 309 + pinctrl-names = "default"; 310 + pinctrl-0 = <&uart1_pins_a>, <&uart1_cts_rts_pins_a>; 311 + status = "okay"; 312 + }; 313 + 314 + &usb_otg { 315 + /* 316 + * The GR8-EVB has a somewhat interesting design. There's a 317 + * pin supposed to control VBUS, an ID pin, a VBUS detect pin, 318 + * so everything should work just fine. 319 + * 320 + * Except that the pin supposed to control VBUS is not 321 + * connected to any controllable output, neither to the SoC 322 + * through a GPIO or to the PMIC, and it is pulled down, 323 + * meaning that we will never be able to enable VBUS on this 324 + * board. 325 + */ 326 + dr_mode = "otg"; 327 + status = "okay"; 328 + }; 329 + 330 + &usb_power_supply { 331 + status = "okay"; 332 + }; 333 + 334 + &usbphy { 335 + pinctrl-names = "default"; 336 + pinctrl-0 = <&usb0_id_pin_gr8_evb>, <&usb0_vbus_det_pin_gr8_evb>; 337 + usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ 338 + usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */ 339 + usb0_vbus_power-supply = <&usb_power_supply>; 340 + usb1_vbus-supply = <&reg_usb1_vbus>; 341 + status = "okay"; 342 + };
+1087
arch/arm/boot/dts/ntc-gr8.dtsi
··· 1 + /* 2 + * Copyright 2016 Mylène Josserand 3 + * 4 + * Mylène Josserand <mylene.josserand@free-electrons.com> 5 + * 6 + * This file is dual-licensed: you can use it either under the terms 7 + * of the GPL or the X11 license, at your option. Note that this dual 8 + * licensing only applies to this file, and not this project as a 9 + * whole. 10 + * 11 + * a) This library is free software; you can redistribute it and/or 12 + * modify it under the terms of the GNU General Public License as 13 + * published by the Free Software Foundation; either version 2 of the 14 + * License, or (at your option) any later version. 15 + * 16 + * This library is distributed in the hope that it will be useful, 17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 + * GNU General Public License for more details. 20 + * 21 + * Or, alternatively, 22 + * 23 + * b) Permission is hereby granted, free of charge, to any person 24 + * obtaining a copy of this software and associated documentation 25 + * files (the "Software"), to deal in the Software without 26 + * restriction, including without limitation the rights to use, 27 + * copy, modify, merge, publish, distribute, sublicense, and/or 28 + * sell copies of the Software, and to permit persons to whom the 29 + * Software is furnished to do so, subject to the following 30 + * conditions: 31 + * 32 + * The above copyright notice and this permission notice shall be 33 + * included in all copies or substantial portions of the Software. 34 + * 35 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 36 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 37 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 38 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 39 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 40 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 41 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 42 + * OTHER DEALINGS IN THE SOFTWARE. 43 + */ 44 + 45 + #include <dt-bindings/clock/sun4i-a10-pll2.h> 46 + #include <dt-bindings/dma/sun4i-a10.h> 47 + #include <dt-bindings/pinctrl/sun4i-a10.h> 48 + 49 + / { 50 + interrupt-parent = <&intc>; 51 + #address-cells = <1>; 52 + #size-cells = <1>; 53 + 54 + cpus { 55 + #address-cells = <1>; 56 + #size-cells = <0>; 57 + 58 + cpu0: cpu@0 { 59 + device_type = "cpu"; 60 + compatible = "arm,cortex-a8"; 61 + reg = <0x0>; 62 + clocks = <&cpu>; 63 + }; 64 + }; 65 + 66 + clocks { 67 + #address-cells = <1>; 68 + #size-cells = <1>; 69 + ranges; 70 + 71 + /* 72 + * This is a dummy clock, to be used as placeholder on 73 + * other mux clocks when a specific parent clock is not 74 + * yet implemented. It should be dropped when the driver 75 + * is complete. 76 + */ 77 + dummy: dummy { 78 + #clock-cells = <0>; 79 + compatible = "fixed-clock"; 80 + clock-frequency = <0>; 81 + }; 82 + 83 + osc24M: clk@01c20050 { 84 + #clock-cells = <0>; 85 + compatible = "allwinner,sun4i-a10-osc-clk"; 86 + reg = <0x01c20050 0x4>; 87 + clock-frequency = <24000000>; 88 + clock-output-names = "osc24M"; 89 + }; 90 + 91 + osc3M: osc3M-clk { 92 + compatible = "fixed-factor-clock"; 93 + #clock-cells = <0>; 94 + clock-div = <8>; 95 + clock-mult = <1>; 96 + clocks = <&osc24M>; 97 + clock-output-names = "osc3M"; 98 + }; 99 + 100 + osc32k: clk@0 { 101 + #clock-cells = <0>; 102 + compatible = "fixed-clock"; 103 + clock-frequency = <32768>; 104 + clock-output-names = "osc32k"; 105 + }; 106 + 107 + pll1: clk@01c20000 { 108 + #clock-cells = <0>; 109 + compatible = "allwinner,sun4i-a10-pll1-clk"; 110 + reg = <0x01c20000 0x4>; 111 + clocks = <&osc24M>; 112 + clock-output-names = "pll1"; 113 + }; 114 + 115 + pll2: clk@01c20008 { 116 + #clock-cells = <1>; 117 + compatible = "allwinner,sun5i-a13-pll2-clk"; 118 + reg = <0x01c20008 0x8>; 119 + clocks = <&osc24M>; 120 + clock-output-names = "pll2-1x", "pll2-2x", 121 + "pll2-4x", "pll2-8x"; 122 + }; 123 + 124 + pll3: clk@01c20010 { 125 + #clock-cells = <0>; 126 + compatible = "allwinner,sun4i-a10-pll3-clk"; 127 + reg = <0x01c20010 0x4>; 128 + clocks = <&osc3M>; 129 + clock-output-names = "pll3"; 130 + }; 131 + 132 + pll3x2: pll3x2-clk { 133 + compatible = "allwinner,sun4i-a10-pll3-2x-clk"; 134 + #clock-cells = <0>; 135 + clock-div = <1>; 136 + clock-mult = <2>; 137 + clocks = <&pll3>; 138 + clock-output-names = "pll3-2x"; 139 + }; 140 + 141 + pll4: clk@01c20018 { 142 + #clock-cells = <0>; 143 + compatible = "allwinner,sun4i-a10-pll1-clk"; 144 + reg = <0x01c20018 0x4>; 145 + clocks = <&osc24M>; 146 + clock-output-names = "pll4"; 147 + }; 148 + 149 + pll5: clk@01c20020 { 150 + #clock-cells = <1>; 151 + compatible = "allwinner,sun4i-a10-pll5-clk"; 152 + reg = <0x01c20020 0x4>; 153 + clocks = <&osc24M>; 154 + clock-output-names = "pll5_ddr", "pll5_other"; 155 + }; 156 + 157 + pll6: clk@01c20028 { 158 + #clock-cells = <1>; 159 + compatible = "allwinner,sun4i-a10-pll6-clk"; 160 + reg = <0x01c20028 0x4>; 161 + clocks = <&osc24M>; 162 + clock-output-names = "pll6_sata", "pll6_other", "pll6"; 163 + }; 164 + 165 + pll7: clk@01c20030 { 166 + #clock-cells = <0>; 167 + compatible = "allwinner,sun4i-a10-pll3-clk"; 168 + reg = <0x01c20030 0x4>; 169 + clocks = <&osc3M>; 170 + clock-output-names = "pll7"; 171 + }; 172 + 173 + pll7x2: pll7x2-clk { 174 + compatible = "allwinner,sun4i-a10-pll3-2x-clk"; 175 + #clock-cells = <0>; 176 + clock-div = <1>; 177 + clock-mult = <2>; 178 + clocks = <&pll7>; 179 + clock-output-names = "pll7-2x"; 180 + }; 181 + 182 + /* dummy is 200M */ 183 + cpu: cpu@01c20054 { 184 + #clock-cells = <0>; 185 + compatible = "allwinner,sun4i-a10-cpu-clk"; 186 + reg = <0x01c20054 0x4>; 187 + clocks = <&osc32k>, <&osc24M>, <&pll1>, <&dummy>; 188 + clock-output-names = "cpu"; 189 + }; 190 + 191 + axi: axi@01c20054 { 192 + #clock-cells = <0>; 193 + compatible = "allwinner,sun4i-a10-axi-clk"; 194 + reg = <0x01c20054 0x4>; 195 + clocks = <&cpu>; 196 + clock-output-names = "axi"; 197 + }; 198 + 199 + ahb: ahb@01c20054 { 200 + #clock-cells = <0>; 201 + compatible = "allwinner,sun5i-a13-ahb-clk"; 202 + reg = <0x01c20054 0x4>; 203 + clocks = <&axi>, <&cpu>, <&pll6 1>; 204 + clock-output-names = "ahb"; 205 + /* 206 + * Use PLL6 as parent, instead of CPU/AXI 207 + * which has rate changes due to cpufreq 208 + */ 209 + assigned-clocks = <&ahb>; 210 + assigned-clock-parents = <&pll6 1>; 211 + }; 212 + 213 + apb0: apb0@01c20054 { 214 + #clock-cells = <0>; 215 + compatible = "allwinner,sun4i-a10-apb0-clk"; 216 + reg = <0x01c20054 0x4>; 217 + clocks = <&ahb>; 218 + clock-output-names = "apb0"; 219 + }; 220 + 221 + apb1: clk@01c20058 { 222 + #clock-cells = <0>; 223 + compatible = "allwinner,sun4i-a10-apb1-clk"; 224 + reg = <0x01c20058 0x4>; 225 + clocks = <&osc24M>, <&pll6 1>, <&osc32k>; 226 + clock-output-names = "apb1"; 227 + }; 228 + 229 + axi_gates: clk@01c2005c { 230 + #clock-cells = <1>; 231 + compatible = "allwinner,sun4i-a10-gates-clk"; 232 + reg = <0x01c2005c 0x4>; 233 + clocks = <&axi>; 234 + clock-indices = <0>; 235 + clock-output-names = "axi_dram"; 236 + }; 237 + 238 + ahb_gates: clk@01c20060 { 239 + #clock-cells = <1>; 240 + compatible = "allwinner,sun5i-a13-ahb-gates-clk"; 241 + reg = <0x01c20060 0x8>; 242 + clocks = <&ahb>; 243 + clock-indices = <0>, <1>, 244 + <2>, <5>, <6>, 245 + <7>, <8>, <9>, 246 + <10>, <13>, 247 + <14>, <17>, <20>, 248 + <21>, <22>, 249 + <28>, <32>, <34>, 250 + <36>, <40>, <44>, 251 + <46>, <51>, 252 + <52>; 253 + clock-output-names = "ahb_usbotg", "ahb_ehci", 254 + "ahb_ohci", "ahb_ss", "ahb_dma", 255 + "ahb_bist", "ahb_mmc0", "ahb_mmc1", 256 + "ahb_mmc2", "ahb_nand", 257 + "ahb_sdram", "ahb_emac", "ahb_spi0", 258 + "ahb_spi1", "ahb_spi2", 259 + "ahb_hstimer", "ahb_ve", "ahb_tve", 260 + "ahb_lcd", "ahb_csi", "ahb_de_be", 261 + "ahb_de_fe", "ahb_iep", 262 + "ahb_mali400"; 263 + }; 264 + 265 + apb0_gates: clk@01c20068 { 266 + #clock-cells = <1>; 267 + compatible = "allwinner,sun4i-a10-gates-clk"; 268 + reg = <0x01c20068 0x4>; 269 + clocks = <&apb0>; 270 + clock-indices = <0>, <3>, 271 + <5>, <6>; 272 + clock-output-names = "apb0_codec", "apb0_i2s0", 273 + "apb0_pio", "apb0_ir"; 274 + }; 275 + 276 + apb1_gates: clk@01c2006c { 277 + #clock-cells = <1>; 278 + compatible = "allwinner,sun4i-a10-gates-clk"; 279 + reg = <0x01c2006c 0x4>; 280 + clocks = <&apb1>; 281 + clock-indices = <0>, <1>, 282 + <2>, <17>, 283 + <18>, <19>; 284 + clock-output-names = "apb1_i2c0", "apb1_i2c1", 285 + "apb1_i2c2", "apb1_uart1", 286 + "apb1_uart2", "apb1_uart3"; 287 + }; 288 + 289 + nand_clk: clk@01c20080 { 290 + #clock-cells = <0>; 291 + compatible = "allwinner,sun4i-a10-mod0-clk"; 292 + reg = <0x01c20080 0x4>; 293 + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; 294 + clock-output-names = "nand"; 295 + }; 296 + 297 + ms_clk: clk@01c20084 { 298 + #clock-cells = <0>; 299 + compatible = "allwinner,sun4i-a10-mod0-clk"; 300 + reg = <0x01c20084 0x4>; 301 + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; 302 + clock-output-names = "ms"; 303 + }; 304 + 305 + mmc0_clk: clk@01c20088 { 306 + #clock-cells = <1>; 307 + compatible = "allwinner,sun4i-a10-mmc-clk"; 308 + reg = <0x01c20088 0x4>; 309 + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; 310 + clock-output-names = "mmc0", 311 + "mmc0_output", 312 + "mmc0_sample"; 313 + }; 314 + 315 + mmc1_clk: clk@01c2008c { 316 + #clock-cells = <1>; 317 + compatible = "allwinner,sun4i-a10-mmc-clk"; 318 + reg = <0x01c2008c 0x4>; 319 + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; 320 + clock-output-names = "mmc1", 321 + "mmc1_output", 322 + "mmc1_sample"; 323 + }; 324 + 325 + mmc2_clk: clk@01c20090 { 326 + #clock-cells = <1>; 327 + compatible = "allwinner,sun4i-a10-mmc-clk"; 328 + reg = <0x01c20090 0x4>; 329 + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; 330 + clock-output-names = "mmc2", 331 + "mmc2_output", 332 + "mmc2_sample"; 333 + }; 334 + 335 + ts_clk: clk@01c20098 { 336 + #clock-cells = <0>; 337 + compatible = "allwinner,sun4i-a10-mod0-clk"; 338 + reg = <0x01c20098 0x4>; 339 + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; 340 + clock-output-names = "ts"; 341 + }; 342 + 343 + ss_clk: clk@01c2009c { 344 + #clock-cells = <0>; 345 + compatible = "allwinner,sun4i-a10-mod0-clk"; 346 + reg = <0x01c2009c 0x4>; 347 + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; 348 + clock-output-names = "ss"; 349 + }; 350 + 351 + spi0_clk: clk@01c200a0 { 352 + #clock-cells = <0>; 353 + compatible = "allwinner,sun4i-a10-mod0-clk"; 354 + reg = <0x01c200a0 0x4>; 355 + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; 356 + clock-output-names = "spi0"; 357 + }; 358 + 359 + spi1_clk: clk@01c200a4 { 360 + #clock-cells = <0>; 361 + compatible = "allwinner,sun4i-a10-mod0-clk"; 362 + reg = <0x01c200a4 0x4>; 363 + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; 364 + clock-output-names = "spi1"; 365 + }; 366 + 367 + spi2_clk: clk@01c200a8 { 368 + #clock-cells = <0>; 369 + compatible = "allwinner,sun4i-a10-mod0-clk"; 370 + reg = <0x01c200a8 0x4>; 371 + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; 372 + clock-output-names = "spi2"; 373 + }; 374 + 375 + ir0_clk: clk@01c200b0 { 376 + #clock-cells = <0>; 377 + compatible = "allwinner,sun4i-a10-mod0-clk"; 378 + reg = <0x01c200b0 0x4>; 379 + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; 380 + clock-output-names = "ir0"; 381 + }; 382 + 383 + i2s0_clk: clk@01c200b8 { 384 + #clock-cells = <0>; 385 + compatible = "allwinner,sun4i-a10-mod1-clk"; 386 + reg = <0x01c200b8 0x4>; 387 + clocks = <&pll2 SUN4I_A10_PLL2_8X>, 388 + <&pll2 SUN4I_A10_PLL2_4X>, 389 + <&pll2 SUN4I_A10_PLL2_2X>, 390 + <&pll2 SUN4I_A10_PLL2_1X>; 391 + clock-output-names = "i2s0"; 392 + }; 393 + 394 + spdif_clk: clk@01c200c0 { 395 + #clock-cells = <0>; 396 + compatible = "allwinner,sun4i-a10-mod1-clk"; 397 + reg = <0x01c200c0 0x4>; 398 + clocks = <&pll2 SUN4I_A10_PLL2_8X>, 399 + <&pll2 SUN4I_A10_PLL2_4X>, 400 + <&pll2 SUN4I_A10_PLL2_2X>, 401 + <&pll2 SUN4I_A10_PLL2_1X>; 402 + clock-output-names = "spdif"; 403 + }; 404 + 405 + usb_clk: clk@01c200cc { 406 + #clock-cells = <1>; 407 + #reset-cells = <1>; 408 + compatible = "allwinner,sun5i-a13-usb-clk"; 409 + reg = <0x01c200cc 0x4>; 410 + clocks = <&pll6 1>; 411 + clock-output-names = "usb_ohci0", "usb_phy"; 412 + }; 413 + 414 + dram_gates: clk@01c20100 { 415 + #clock-cells = <1>; 416 + compatible = "nextthing,gr8-dram-gates-clk", 417 + "allwinner,sun4i-a10-gates-clk"; 418 + reg = <0x01c20100 0x4>; 419 + clocks = <&pll5 0>; 420 + clock-indices = <0>, 421 + <1>, 422 + <25>, 423 + <26>, 424 + <29>, 425 + <31>; 426 + clock-output-names = "dram_ve", 427 + "dram_csi", 428 + "dram_de_fe", 429 + "dram_de_be", 430 + "dram_ace", 431 + "dram_iep"; 432 + }; 433 + 434 + de_be_clk: clk@01c20104 { 435 + #clock-cells = <0>; 436 + #reset-cells = <0>; 437 + compatible = "allwinner,sun4i-a10-display-clk"; 438 + reg = <0x01c20104 0x4>; 439 + clocks = <&pll3>, <&pll7>, <&pll5 1>; 440 + clock-output-names = "de-be"; 441 + }; 442 + 443 + de_fe_clk: clk@01c2010c { 444 + #clock-cells = <0>; 445 + #reset-cells = <0>; 446 + compatible = "allwinner,sun4i-a10-display-clk"; 447 + reg = <0x01c2010c 0x4>; 448 + clocks = <&pll3>, <&pll7>, <&pll5 1>; 449 + clock-output-names = "de-fe"; 450 + }; 451 + 452 + tcon_ch0_clk: clk@01c20118 { 453 + #clock-cells = <0>; 454 + #reset-cells = <1>; 455 + compatible = "allwinner,sun4i-a10-tcon-ch0-clk"; 456 + reg = <0x01c20118 0x4>; 457 + clocks = <&pll3>, <&pll7>, <&pll3x2>, <&pll7x2>; 458 + clock-output-names = "tcon-ch0-sclk"; 459 + }; 460 + 461 + tcon_ch1_clk: clk@01c2012c { 462 + #clock-cells = <0>; 463 + compatible = "allwinner,sun4i-a10-tcon-ch1-clk"; 464 + reg = <0x01c2012c 0x4>; 465 + clocks = <&pll3>, <&pll7>, <&pll3x2>, <&pll7x2>; 466 + clock-output-names = "tcon-ch1-sclk"; 467 + }; 468 + 469 + codec_clk: clk@01c20140 { 470 + #clock-cells = <0>; 471 + compatible = "allwinner,sun4i-a10-codec-clk"; 472 + reg = <0x01c20140 0x4>; 473 + clocks = <&pll2 SUN4I_A10_PLL2_1X>; 474 + clock-output-names = "codec"; 475 + }; 476 + 477 + mbus_clk: clk@01c2015c { 478 + #clock-cells = <0>; 479 + compatible = "allwinner,sun5i-a13-mbus-clk"; 480 + reg = <0x01c2015c 0x4>; 481 + clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; 482 + clock-output-names = "mbus"; 483 + }; 484 + }; 485 + 486 + display-engine { 487 + compatible = "allwinner,sun5i-a13-display-engine"; 488 + allwinner,pipelines = <&fe0>; 489 + }; 490 + 491 + soc@01c00000 { 492 + compatible = "simple-bus"; 493 + #address-cells = <1>; 494 + #size-cells = <1>; 495 + ranges; 496 + 497 + sram-controller@01c00000 { 498 + compatible = "allwinner,sun4i-a10-sram-controller"; 499 + reg = <0x01c00000 0x30>; 500 + #address-cells = <1>; 501 + #size-cells = <1>; 502 + ranges; 503 + 504 + sram_a: sram@00000000 { 505 + compatible = "mmio-sram"; 506 + reg = <0x00000000 0xc000>; 507 + #address-cells = <1>; 508 + #size-cells = <1>; 509 + ranges = <0 0x00000000 0xc000>; 510 + }; 511 + 512 + sram_d: sram@00010000 { 513 + compatible = "mmio-sram"; 514 + reg = <0x00010000 0x1000>; 515 + #address-cells = <1>; 516 + #size-cells = <1>; 517 + ranges = <0 0x00010000 0x1000>; 518 + 519 + otg_sram: sram-section@0000 { 520 + compatible = "allwinner,sun4i-a10-sram-d"; 521 + reg = <0x0000 0x1000>; 522 + status = "disabled"; 523 + }; 524 + }; 525 + }; 526 + 527 + dma: dma-controller@01c02000 { 528 + compatible = "allwinner,sun4i-a10-dma"; 529 + reg = <0x01c02000 0x1000>; 530 + interrupts = <27>; 531 + clocks = <&ahb_gates 6>; 532 + #dma-cells = <2>; 533 + }; 534 + 535 + nfc: nand@01c03000 { 536 + compatible = "allwinner,sun4i-a10-nand"; 537 + reg = <0x01c03000 0x1000>; 538 + interrupts = <37>; 539 + clocks = <&ahb_gates 13>, <&nand_clk>; 540 + clock-names = "ahb", "mod"; 541 + dmas = <&dma SUN4I_DMA_DEDICATED 3>; 542 + dma-names = "rxtx"; 543 + status = "disabled"; 544 + #address-cells = <1>; 545 + #size-cells = <0>; 546 + }; 547 + 548 + spi0: spi@01c05000 { 549 + compatible = "allwinner,sun4i-a10-spi"; 550 + reg = <0x01c05000 0x1000>; 551 + interrupts = <10>; 552 + clocks = <&ahb_gates 20>, <&spi0_clk>; 553 + clock-names = "ahb", "mod"; 554 + dmas = <&dma SUN4I_DMA_DEDICATED 27>, 555 + <&dma SUN4I_DMA_DEDICATED 26>; 556 + dma-names = "rx", "tx"; 557 + status = "disabled"; 558 + #address-cells = <1>; 559 + #size-cells = <0>; 560 + }; 561 + 562 + spi1: spi@01c06000 { 563 + compatible = "allwinner,sun4i-a10-spi"; 564 + reg = <0x01c06000 0x1000>; 565 + interrupts = <11>; 566 + clocks = <&ahb_gates 21>, <&spi1_clk>; 567 + clock-names = "ahb", "mod"; 568 + dmas = <&dma SUN4I_DMA_DEDICATED 9>, 569 + <&dma SUN4I_DMA_DEDICATED 8>; 570 + dma-names = "rx", "tx"; 571 + status = "disabled"; 572 + #address-cells = <1>; 573 + #size-cells = <0>; 574 + }; 575 + 576 + tve0: tv-encoder@01c0a000 { 577 + compatible = "allwinner,sun4i-a10-tv-encoder"; 578 + reg = <0x01c0a000 0x1000>; 579 + clocks = <&ahb_gates 34>; 580 + resets = <&tcon_ch0_clk 0>; 581 + status = "disabled"; 582 + 583 + port { 584 + #address-cells = <1>; 585 + #size-cells = <0>; 586 + 587 + tve0_in_tcon0: endpoint@0 { 588 + reg = <0>; 589 + remote-endpoint = <&tcon0_out_tve0>; 590 + }; 591 + }; 592 + }; 593 + 594 + tcon0: lcd-controller@01c0c000 { 595 + compatible = "allwinner,sun5i-a13-tcon"; 596 + reg = <0x01c0c000 0x1000>; 597 + interrupts = <44>; 598 + resets = <&tcon_ch0_clk 1>; 599 + reset-names = "lcd"; 600 + clocks = <&ahb_gates 36>, 601 + <&tcon_ch0_clk>, 602 + <&tcon_ch1_clk>; 603 + clock-names = "ahb", 604 + "tcon-ch0", 605 + "tcon-ch1"; 606 + clock-output-names = "tcon-pixel-clock"; 607 + status = "disabled"; 608 + 609 + ports { 610 + #address-cells = <1>; 611 + #size-cells = <0>; 612 + 613 + tcon0_in: port@0 { 614 + #address-cells = <1>; 615 + #size-cells = <0>; 616 + reg = <0>; 617 + 618 + tcon0_in_be0: endpoint@0 { 619 + reg = <0>; 620 + remote-endpoint = <&be0_out_tcon0>; 621 + }; 622 + }; 623 + 624 + tcon0_out: port@1 { 625 + #address-cells = <1>; 626 + #size-cells = <0>; 627 + reg = <1>; 628 + 629 + tcon0_out_tve0: endpoint@1 { 630 + reg = <1>; 631 + remote-endpoint = <&tve0_in_tcon0>; 632 + }; 633 + }; 634 + }; 635 + }; 636 + 637 + mmc0: mmc@01c0f000 { 638 + compatible = "allwinner,sun5i-a13-mmc"; 639 + reg = <0x01c0f000 0x1000>; 640 + clocks = <&ahb_gates 8>, 641 + <&mmc0_clk 0>, 642 + <&mmc0_clk 1>, 643 + <&mmc0_clk 2>; 644 + clock-names = "ahb", 645 + "mmc", 646 + "output", 647 + "sample"; 648 + interrupts = <32>; 649 + status = "disabled"; 650 + #address-cells = <1>; 651 + #size-cells = <0>; 652 + }; 653 + 654 + mmc1: mmc@01c10000 { 655 + compatible = "allwinner,sun5i-a13-mmc"; 656 + reg = <0x01c10000 0x1000>; 657 + clocks = <&ahb_gates 9>, 658 + <&mmc1_clk 0>, 659 + <&mmc1_clk 1>, 660 + <&mmc1_clk 2>; 661 + clock-names = "ahb", 662 + "mmc", 663 + "output", 664 + "sample"; 665 + interrupts = <33>; 666 + status = "disabled"; 667 + #address-cells = <1>; 668 + #size-cells = <0>; 669 + }; 670 + 671 + mmc2: mmc@01c11000 { 672 + compatible = "allwinner,sun5i-a13-mmc"; 673 + reg = <0x01c11000 0x1000>; 674 + clocks = <&ahb_gates 10>, 675 + <&mmc2_clk 0>, 676 + <&mmc2_clk 1>, 677 + <&mmc2_clk 2>; 678 + clock-names = "ahb", 679 + "mmc", 680 + "output", 681 + "sample"; 682 + interrupts = <34>; 683 + status = "disabled"; 684 + #address-cells = <1>; 685 + #size-cells = <0>; 686 + }; 687 + 688 + usb_otg: usb@01c13000 { 689 + compatible = "allwinner,sun4i-a10-musb"; 690 + reg = <0x01c13000 0x0400>; 691 + clocks = <&ahb_gates 0>; 692 + interrupts = <38>; 693 + interrupt-names = "mc"; 694 + phys = <&usbphy 0>; 695 + phy-names = "usb"; 696 + extcon = <&usbphy 0>; 697 + allwinner,sram = <&otg_sram 1>; 698 + status = "disabled"; 699 + 700 + dr_mode = "otg"; 701 + }; 702 + 703 + usbphy: phy@01c13400 { 704 + #phy-cells = <1>; 705 + compatible = "allwinner,sun5i-a13-usb-phy"; 706 + reg = <0x01c13400 0x10 0x01c14800 0x4>; 707 + reg-names = "phy_ctrl", "pmu1"; 708 + clocks = <&usb_clk 8>; 709 + clock-names = "usb_phy"; 710 + resets = <&usb_clk 0>, <&usb_clk 1>; 711 + reset-names = "usb0_reset", "usb1_reset"; 712 + status = "disabled"; 713 + }; 714 + 715 + ehci0: usb@01c14000 { 716 + compatible = "allwinner,sun5i-a13-ehci", "generic-ehci"; 717 + reg = <0x01c14000 0x100>; 718 + interrupts = <39>; 719 + clocks = <&ahb_gates 1>; 720 + phys = <&usbphy 1>; 721 + phy-names = "usb"; 722 + status = "disabled"; 723 + }; 724 + 725 + ohci0: usb@01c14400 { 726 + compatible = "allwinner,sun5i-a13-ohci", "generic-ohci"; 727 + reg = <0x01c14400 0x100>; 728 + interrupts = <40>; 729 + clocks = <&usb_clk 6>, <&ahb_gates 2>; 730 + phys = <&usbphy 1>; 731 + phy-names = "usb"; 732 + status = "disabled"; 733 + }; 734 + 735 + spi2: spi@01c17000 { 736 + compatible = "allwinner,sun4i-a10-spi"; 737 + reg = <0x01c17000 0x1000>; 738 + interrupts = <12>; 739 + clocks = <&ahb_gates 22>, <&spi2_clk>; 740 + clock-names = "ahb", "mod"; 741 + dmas = <&dma SUN4I_DMA_DEDICATED 29>, 742 + <&dma SUN4I_DMA_DEDICATED 28>; 743 + dma-names = "rx", "tx"; 744 + status = "disabled"; 745 + #address-cells = <1>; 746 + #size-cells = <0>; 747 + }; 748 + 749 + intc: interrupt-controller@01c20400 { 750 + compatible = "allwinner,sun4i-a10-ic"; 751 + reg = <0x01c20400 0x400>; 752 + interrupt-controller; 753 + #interrupt-cells = <1>; 754 + }; 755 + 756 + pio: pinctrl@01c20800 { 757 + compatible = "nextthing,gr8-pinctrl"; 758 + reg = <0x01c20800 0x400>; 759 + interrupts = <28>; 760 + clocks = <&apb0_gates 5>; 761 + gpio-controller; 762 + interrupt-controller; 763 + #interrupt-cells = <3>; 764 + #gpio-cells = <3>; 765 + 766 + i2c0_pins_a: i2c0@0 { 767 + allwinner,pins = "PB0", "PB1"; 768 + allwinner,function = "i2c0"; 769 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 770 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 771 + }; 772 + 773 + i2c1_pins_a: i2c1@0 { 774 + allwinner,pins = "PB15", "PB16"; 775 + allwinner,function = "i2c1"; 776 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 777 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 778 + }; 779 + 780 + i2c2_pins_a: i2c2@0 { 781 + allwinner,pins = "PB17", "PB18"; 782 + allwinner,function = "i2c2"; 783 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 784 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 785 + }; 786 + 787 + i2s0_data_pins_a: i2s0-data@0 { 788 + allwinner,pins = "PB6", "PB7", "PB8", "PB9"; 789 + allwinner,function = "i2s0"; 790 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 791 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 792 + }; 793 + 794 + i2s0_mclk_pins_a: i2s0-mclk@0 { 795 + allwinner,pins = "PB6", "PB7", "PB8", "PB9"; 796 + allwinner,function = "i2s0"; 797 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 798 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 799 + }; 800 + 801 + ir0_rx_pins_a: ir0@0 { 802 + allwinner,pins = "PB4"; 803 + allwinner,function = "ir0"; 804 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 805 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 806 + }; 807 + 808 + lcd_rgb666_pins: lcd-rgb666@0 { 809 + allwinner,pins = "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", 810 + "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", 811 + "PD18", "PD19", "PD20", "PD21", "PD22", "PD23", 812 + "PD24", "PD25", "PD26", "PD27"; 813 + allwinner,function = "lcd0"; 814 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 815 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 816 + }; 817 + 818 + mmc0_pins_a: mmc0@0 { 819 + allwinner,pins = "PF0", "PF1", "PF2", "PF3", 820 + "PF4", "PF5"; 821 + allwinner,function = "mmc0"; 822 + allwinner,drive = <SUN4I_PINCTRL_30_MA>; 823 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 824 + }; 825 + 826 + nand_pins_a: nand-base0@0 { 827 + allwinner,pins = "PC0", "PC1", "PC2", 828 + "PC5", "PC8", "PC9", "PC10", 829 + "PC11", "PC12", "PC13", "PC14", 830 + "PC15"; 831 + allwinner,function = "nand0"; 832 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 833 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 834 + }; 835 + 836 + nand_cs0_pins_a: nand-cs@0 { 837 + allwinner,pins = "PC4"; 838 + allwinner,function = "nand0"; 839 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 840 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 841 + }; 842 + 843 + nand_rb0_pins_a: nand-rb@0 { 844 + allwinner,pins = "PC6"; 845 + allwinner,function = "nand0"; 846 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 847 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 848 + }; 849 + 850 + pwm0_pins_a: pwm0@0 { 851 + allwinner,pins = "PB2"; 852 + allwinner,function = "pwm0"; 853 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 854 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 855 + }; 856 + 857 + spdif_tx_pins_a: spdif@0 { 858 + allwinner,pins = "PB10"; 859 + allwinner,function = "spdif"; 860 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 861 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 862 + }; 863 + 864 + uart1_pins_a: uart1@1 { 865 + allwinner,pins = "PG3", "PG4"; 866 + allwinner,function = "uart1"; 867 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 868 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 869 + }; 870 + 871 + uart1_cts_rts_pins_a: uart1-cts-rts@0 { 872 + allwinner,pins = "PG5", "PG6"; 873 + allwinner,function = "uart1"; 874 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 875 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 876 + }; 877 + }; 878 + 879 + pwm: pwm@01c20e00 { 880 + compatible = "allwinner,sun5i-a10s-pwm"; 881 + reg = <0x01c20e00 0xc>; 882 + clocks = <&osc24M>; 883 + #pwm-cells = <3>; 884 + status = "disabled"; 885 + }; 886 + 887 + timer@01c20c00 { 888 + compatible = "allwinner,sun4i-a10-timer"; 889 + reg = <0x01c20c00 0x90>; 890 + interrupts = <22>; 891 + clocks = <&osc24M>; 892 + }; 893 + 894 + wdt: watchdog@01c20c90 { 895 + compatible = "allwinner,sun4i-a10-wdt"; 896 + reg = <0x01c20c90 0x10>; 897 + }; 898 + 899 + spdif: spdif@01c21000 { 900 + #sound-dai-cells = <0>; 901 + compatible = "allwinner,sun4i-a10-spdif"; 902 + reg = <0x01c21000 0x400>; 903 + interrupts = <13>; 904 + clocks = <&apb0_gates 1>, <&spdif_clk>; 905 + clock-names = "apb", "spdif"; 906 + dmas = <&dma SUN4I_DMA_NORMAL 2>, 907 + <&dma SUN4I_DMA_NORMAL 2>; 908 + dma-names = "rx", "tx"; 909 + status = "disabled"; 910 + }; 911 + 912 + ir0: ir@01c21800 { 913 + compatible = "allwinner,sun4i-a10-ir"; 914 + clocks = <&apb0_gates 6>, <&ir0_clk>; 915 + clock-names = "apb", "ir"; 916 + interrupts = <5>; 917 + reg = <0x01c21800 0x40>; 918 + status = "disabled"; 919 + }; 920 + 921 + i2s0: i2s@01c22400 { 922 + #sound-dai-cells = <0>; 923 + compatible = "allwinner,sun4i-a10-i2s"; 924 + reg = <0x01c22400 0x400>; 925 + interrupts = <16>; 926 + clocks = <&apb0_gates 3>, <&i2s0_clk>; 927 + clock-names = "apb", "mod"; 928 + dmas = <&dma SUN4I_DMA_NORMAL 3>, 929 + <&dma SUN4I_DMA_NORMAL 3>; 930 + dma-names = "rx", "tx"; 931 + status = "disabled"; 932 + }; 933 + 934 + lradc: lradc@01c22800 { 935 + compatible = "allwinner,sun4i-a10-lradc-keys"; 936 + reg = <0x01c22800 0x100>; 937 + interrupts = <31>; 938 + status = "disabled"; 939 + }; 940 + 941 + codec: codec@01c22c00 { 942 + #sound-dai-cells = <0>; 943 + compatible = "allwinner,sun4i-a10-codec"; 944 + reg = <0x01c22c00 0x40>; 945 + interrupts = <30>; 946 + clocks = <&apb0_gates 0>, <&codec_clk>; 947 + clock-names = "apb", "codec"; 948 + dmas = <&dma SUN4I_DMA_NORMAL 19>, 949 + <&dma SUN4I_DMA_NORMAL 19>; 950 + dma-names = "rx", "tx"; 951 + status = "disabled"; 952 + }; 953 + 954 + rtp: rtp@01c25000 { 955 + compatible = "allwinner,sun5i-a13-ts"; 956 + reg = <0x01c25000 0x100>; 957 + interrupts = <29>; 958 + #thermal-sensor-cells = <0>; 959 + }; 960 + 961 + uart1: serial@01c28400 { 962 + compatible = "snps,dw-apb-uart"; 963 + reg = <0x01c28400 0x400>; 964 + interrupts = <2>; 965 + reg-shift = <2>; 966 + reg-io-width = <4>; 967 + clocks = <&apb1_gates 17>; 968 + status = "disabled"; 969 + }; 970 + 971 + uart2: serial@01c28800 { 972 + compatible = "snps,dw-apb-uart"; 973 + reg = <0x01c28800 0x400>; 974 + interrupts = <3>; 975 + reg-shift = <2>; 976 + reg-io-width = <4>; 977 + clocks = <&apb1_gates 18>; 978 + status = "disabled"; 979 + }; 980 + 981 + i2c0: i2c@01c2ac00 { 982 + compatible = "allwinner,sun4i-a10-i2c"; 983 + reg = <0x01c2ac00 0x400>; 984 + interrupts = <7>; 985 + clocks = <&apb1_gates 0>; 986 + status = "disabled"; 987 + #address-cells = <1>; 988 + #size-cells = <0>; 989 + }; 990 + 991 + i2c1: i2c@01c2b000 { 992 + compatible = "allwinner,sun4i-a10-i2c"; 993 + reg = <0x01c2b000 0x400>; 994 + interrupts = <8>; 995 + clocks = <&apb1_gates 1>; 996 + status = "disabled"; 997 + #address-cells = <1>; 998 + #size-cells = <0>; 999 + }; 1000 + 1001 + i2c2: i2c@01c2b400 { 1002 + compatible = "allwinner,sun4i-a10-i2c"; 1003 + reg = <0x01c2b400 0x400>; 1004 + interrupts = <9>; 1005 + clocks = <&apb1_gates 2>; 1006 + status = "disabled"; 1007 + #address-cells = <1>; 1008 + #size-cells = <0>; 1009 + }; 1010 + 1011 + timer@01c60000 { 1012 + compatible = "allwinner,sun5i-a13-hstimer"; 1013 + reg = <0x01c60000 0x1000>; 1014 + interrupts = <82>, <83>; 1015 + clocks = <&ahb_gates 28>; 1016 + }; 1017 + 1018 + fe0: display-frontend@01e00000 { 1019 + compatible = "allwinner,sun5i-a13-display-frontend"; 1020 + reg = <0x01e00000 0x20000>; 1021 + interrupts = <47>; 1022 + clocks = <&ahb_gates 46>, <&de_fe_clk>, 1023 + <&dram_gates 25>; 1024 + clock-names = "ahb", "mod", 1025 + "ram"; 1026 + resets = <&de_fe_clk>; 1027 + status = "disabled"; 1028 + 1029 + ports { 1030 + #address-cells = <1>; 1031 + #size-cells = <0>; 1032 + 1033 + fe0_out: port@1 { 1034 + #address-cells = <1>; 1035 + #size-cells = <0>; 1036 + reg = <1>; 1037 + 1038 + fe0_out_be0: endpoint@0 { 1039 + reg = <0>; 1040 + remote-endpoint = <&be0_in_fe0>; 1041 + }; 1042 + }; 1043 + }; 1044 + }; 1045 + 1046 + be0: display-backend@01e60000 { 1047 + compatible = "allwinner,sun5i-a13-display-backend"; 1048 + reg = <0x01e60000 0x10000>; 1049 + clocks = <&ahb_gates 44>, <&de_be_clk>, 1050 + <&dram_gates 26>; 1051 + clock-names = "ahb", "mod", 1052 + "ram"; 1053 + resets = <&de_be_clk>; 1054 + status = "disabled"; 1055 + 1056 + assigned-clocks = <&de_be_clk>; 1057 + assigned-clock-rates = <300000000>; 1058 + 1059 + ports { 1060 + #address-cells = <1>; 1061 + #size-cells = <0>; 1062 + 1063 + be0_in: port@0 { 1064 + #address-cells = <1>; 1065 + #size-cells = <0>; 1066 + reg = <0>; 1067 + 1068 + be0_in_fe0: endpoint@0 { 1069 + reg = <0>; 1070 + remote-endpoint = <&fe0_out_be0>; 1071 + }; 1072 + }; 1073 + 1074 + be0_out: port@1 { 1075 + #address-cells = <1>; 1076 + #size-cells = <0>; 1077 + reg = <1>; 1078 + 1079 + be0_out_tcon0: endpoint@0 { 1080 + reg = <0>; 1081 + remote-endpoint = <&tcon0_in_be0>; 1082 + }; 1083 + }; 1084 + }; 1085 + }; 1086 + }; 1087 + };
+97 -327
arch/arm/boot/dts/sun6i-a31.dtsi
··· 47 47 #include <dt-bindings/interrupt-controller/arm-gic.h> 48 48 #include <dt-bindings/thermal/thermal.h> 49 49 50 + #include <dt-bindings/clock/sun6i-a31-ccu.h> 50 51 #include <dt-bindings/pinctrl/sun4i-a10.h> 52 + #include <dt-bindings/reset/sun6i-a31-ccu.h> 51 53 52 54 / { 53 55 interrupt-parent = <&gic>; ··· 67 65 compatible = "allwinner,simple-framebuffer", 68 66 "simple-framebuffer"; 69 67 allwinner,pipeline = "de_be0-lcd0-hdmi"; 70 - clocks = <&pll6 0>; 68 + clocks = <&ccu CLK_AHB1_BE0>, <&ccu CLK_AHB1_LCD0>, 69 + <&ccu CLK_AHB1_HDMI>, <&ccu CLK_DRAM_BE0>, 70 + <&ccu CLK_IEP_DRC0>, <&ccu CLK_BE0>, 71 + <&ccu CLK_LCD0_CH1>, <&ccu CLK_HDMI>; 71 72 status = "disabled"; 72 73 }; 73 74 ··· 78 73 compatible = "allwinner,simple-framebuffer", 79 74 "simple-framebuffer"; 80 75 allwinner,pipeline = "de_be0-lcd0"; 81 - clocks = <&pll6 0>; 76 + clocks = <&ccu CLK_AHB1_BE0>, <&ccu CLK_AHB1_LCD0>, 77 + <&ccu CLK_DRAM_BE0>, <&ccu CLK_IEP_DRC0>, 78 + <&ccu CLK_BE0>, <&ccu CLK_LCD0_CH0>; 82 79 status = "disabled"; 83 80 }; 84 81 }; ··· 104 97 compatible = "arm,cortex-a7"; 105 98 device_type = "cpu"; 106 99 reg = <0>; 107 - clocks = <&cpu>; 100 + clocks = <&ccu CLK_CPU>; 108 101 clock-latency = <244144>; /* 8 32k periods */ 109 102 operating-points = < 110 103 /* kHz uV */ ··· 199 192 clock-output-names = "osc32k"; 200 193 }; 201 194 202 - pll1: clk@01c20000 { 203 - #clock-cells = <0>; 204 - compatible = "allwinner,sun6i-a31-pll1-clk"; 205 - reg = <0x01c20000 0x4>; 206 - clocks = <&osc24M>; 207 - clock-output-names = "pll1"; 208 - }; 209 - 210 - pll6: clk@01c20028 { 211 - #clock-cells = <1>; 212 - compatible = "allwinner,sun6i-a31-pll6-clk"; 213 - reg = <0x01c20028 0x4>; 214 - clocks = <&osc24M>; 215 - clock-output-names = "pll6", "pll6x2"; 216 - }; 217 - 218 - cpu: cpu@01c20050 { 219 - #clock-cells = <0>; 220 - compatible = "allwinner,sun4i-a10-cpu-clk"; 221 - reg = <0x01c20050 0x4>; 222 - 223 - /* 224 - * PLL1 is listed twice here. 225 - * While it looks suspicious, it's actually documented 226 - * that way both in the datasheet and in the code from 227 - * Allwinner. 228 - */ 229 - clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>; 230 - clock-output-names = "cpu"; 231 - }; 232 - 233 - axi: axi@01c20050 { 234 - #clock-cells = <0>; 235 - compatible = "allwinner,sun4i-a10-axi-clk"; 236 - reg = <0x01c20050 0x4>; 237 - clocks = <&cpu>; 238 - clock-output-names = "axi"; 239 - }; 240 - 241 - ahb1: ahb1@01c20054 { 242 - #clock-cells = <0>; 243 - compatible = "allwinner,sun6i-a31-ahb1-clk"; 244 - reg = <0x01c20054 0x4>; 245 - clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>; 246 - clock-output-names = "ahb1"; 247 - 248 - /* 249 - * Clock AHB1 from PLL6, instead of CPU/AXI which 250 - * has rate changes due to cpufreq. Also the DMA 251 - * controller requires AHB1 clocked from PLL6. 252 - */ 253 - assigned-clocks = <&ahb1>; 254 - assigned-clock-parents = <&pll6 0>; 255 - }; 256 - 257 - ahb1_gates: clk@01c20060 { 258 - #clock-cells = <1>; 259 - compatible = "allwinner,sun6i-a31-ahb1-gates-clk"; 260 - reg = <0x01c20060 0x8>; 261 - clocks = <&ahb1>; 262 - clock-indices = <1>, <5>, 263 - <6>, <8>, <9>, 264 - <10>, <11>, <12>, 265 - <13>, <14>, 266 - <17>, <18>, <19>, 267 - <20>, <21>, <22>, 268 - <23>, <24>, <26>, 269 - <27>, <29>, 270 - <30>, <31>, <32>, 271 - <36>, <37>, <40>, 272 - <43>, <44>, <45>, 273 - <46>, <47>, <50>, 274 - <52>, <55>, <56>, 275 - <57>, <58>; 276 - clock-output-names = "ahb1_mipidsi", "ahb1_ss", 277 - "ahb1_dma", "ahb1_mmc0", "ahb1_mmc1", 278 - "ahb1_mmc2", "ahb1_mmc3", "ahb1_nand1", 279 - "ahb1_nand0", "ahb1_sdram", 280 - "ahb1_gmac", "ahb1_ts", "ahb1_hstimer", 281 - "ahb1_spi0", "ahb1_spi1", "ahb1_spi2", 282 - "ahb1_spi3", "ahb1_otg", "ahb1_ehci0", 283 - "ahb1_ehci1", "ahb1_ohci0", 284 - "ahb1_ohci1", "ahb1_ohci2", "ahb1_ve", 285 - "ahb1_lcd0", "ahb1_lcd1", "ahb1_csi", 286 - "ahb1_hdmi", "ahb1_de0", "ahb1_de1", 287 - "ahb1_fe0", "ahb1_fe1", "ahb1_mp", 288 - "ahb1_gpu", "ahb1_deu0", "ahb1_deu1", 289 - "ahb1_drc0", "ahb1_drc1"; 290 - }; 291 - 292 - apb1: apb1@01c20054 { 293 - #clock-cells = <0>; 294 - compatible = "allwinner,sun4i-a10-apb0-clk"; 295 - reg = <0x01c20054 0x4>; 296 - clocks = <&ahb1>; 297 - clock-output-names = "apb1"; 298 - }; 299 - 300 - apb1_gates: clk@01c20068 { 301 - #clock-cells = <1>; 302 - compatible = "allwinner,sun6i-a31-apb1-gates-clk"; 303 - reg = <0x01c20068 0x4>; 304 - clocks = <&apb1>; 305 - clock-indices = <0>, <4>, 306 - <5>, <12>, 307 - <13>; 308 - clock-output-names = "apb1_codec", "apb1_digital_mic", 309 - "apb1_pio", "apb1_daudio0", 310 - "apb1_daudio1"; 311 - }; 312 - 313 - apb2: clk@01c20058 { 314 - #clock-cells = <0>; 315 - compatible = "allwinner,sun4i-a10-apb1-clk"; 316 - reg = <0x01c20058 0x4>; 317 - clocks = <&osc32k>, <&osc24M>, <&pll6 0>, <&pll6 0>; 318 - clock-output-names = "apb2"; 319 - }; 320 - 321 - apb2_gates: clk@01c2006c { 322 - #clock-cells = <1>; 323 - compatible = "allwinner,sun6i-a31-apb2-gates-clk"; 324 - reg = <0x01c2006c 0x4>; 325 - clocks = <&apb2>; 326 - clock-indices = <0>, <1>, 327 - <2>, <3>, <16>, 328 - <17>, <18>, <19>, 329 - <20>, <21>; 330 - clock-output-names = "apb2_i2c0", "apb2_i2c1", 331 - "apb2_i2c2", "apb2_i2c3", 332 - "apb2_uart0", "apb2_uart1", 333 - "apb2_uart2", "apb2_uart3", 334 - "apb2_uart4", "apb2_uart5"; 335 - }; 336 - 337 - mmc0_clk: clk@01c20088 { 338 - #clock-cells = <1>; 339 - compatible = "allwinner,sun4i-a10-mmc-clk"; 340 - reg = <0x01c20088 0x4>; 341 - clocks = <&osc24M>, <&pll6 0>; 342 - clock-output-names = "mmc0", 343 - "mmc0_output", 344 - "mmc0_sample"; 345 - }; 346 - 347 - mmc1_clk: clk@01c2008c { 348 - #clock-cells = <1>; 349 - compatible = "allwinner,sun4i-a10-mmc-clk"; 350 - reg = <0x01c2008c 0x4>; 351 - clocks = <&osc24M>, <&pll6 0>; 352 - clock-output-names = "mmc1", 353 - "mmc1_output", 354 - "mmc1_sample"; 355 - }; 356 - 357 - mmc2_clk: clk@01c20090 { 358 - #clock-cells = <1>; 359 - compatible = "allwinner,sun4i-a10-mmc-clk"; 360 - reg = <0x01c20090 0x4>; 361 - clocks = <&osc24M>, <&pll6 0>; 362 - clock-output-names = "mmc2", 363 - "mmc2_output", 364 - "mmc2_sample"; 365 - }; 366 - 367 - mmc3_clk: clk@01c20094 { 368 - #clock-cells = <1>; 369 - compatible = "allwinner,sun4i-a10-mmc-clk"; 370 - reg = <0x01c20094 0x4>; 371 - clocks = <&osc24M>, <&pll6 0>; 372 - clock-output-names = "mmc3", 373 - "mmc3_output", 374 - "mmc3_sample"; 375 - }; 376 - 377 - ss_clk: clk@01c2009c { 378 - #clock-cells = <0>; 379 - compatible = "allwinner,sun4i-a10-mod0-clk"; 380 - reg = <0x01c2009c 0x4>; 381 - clocks = <&osc24M>, <&pll6 0>; 382 - clock-output-names = "ss"; 383 - }; 384 - 385 - spi0_clk: clk@01c200a0 { 386 - #clock-cells = <0>; 387 - compatible = "allwinner,sun4i-a10-mod0-clk"; 388 - reg = <0x01c200a0 0x4>; 389 - clocks = <&osc24M>, <&pll6 0>; 390 - clock-output-names = "spi0"; 391 - }; 392 - 393 - spi1_clk: clk@01c200a4 { 394 - #clock-cells = <0>; 395 - compatible = "allwinner,sun4i-a10-mod0-clk"; 396 - reg = <0x01c200a4 0x4>; 397 - clocks = <&osc24M>, <&pll6 0>; 398 - clock-output-names = "spi1"; 399 - }; 400 - 401 - spi2_clk: clk@01c200a8 { 402 - #clock-cells = <0>; 403 - compatible = "allwinner,sun4i-a10-mod0-clk"; 404 - reg = <0x01c200a8 0x4>; 405 - clocks = <&osc24M>, <&pll6 0>; 406 - clock-output-names = "spi2"; 407 - }; 408 - 409 - spi3_clk: clk@01c200ac { 410 - #clock-cells = <0>; 411 - compatible = "allwinner,sun4i-a10-mod0-clk"; 412 - reg = <0x01c200ac 0x4>; 413 - clocks = <&osc24M>, <&pll6 0>; 414 - clock-output-names = "spi3"; 415 - }; 416 - 417 - usb_clk: clk@01c200cc { 418 - #clock-cells = <1>; 419 - #reset-cells = <1>; 420 - compatible = "allwinner,sun6i-a31-usb-clk"; 421 - reg = <0x01c200cc 0x4>; 422 - clocks = <&osc24M>; 423 - clock-indices = <8>, <9>, <10>, 424 - <16>, <17>, 425 - <18>; 426 - clock-output-names = "usb_phy0", "usb_phy1", "usb_phy2", 427 - "usb_ohci0", "usb_ohci1", 428 - "usb_ohci2"; 429 - }; 430 - 431 195 /* 432 196 * The following two are dummy clocks, placeholders 433 197 * used in the gmac_tx clock. The gmac driver will ··· 241 463 compatible = "allwinner,sun6i-a31-dma"; 242 464 reg = <0x01c02000 0x1000>; 243 465 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; 244 - clocks = <&ahb1_gates 6>; 245 - resets = <&ahb1_rst 6>; 466 + clocks = <&ccu CLK_AHB1_DMA>; 467 + resets = <&ccu RST_AHB1_DMA>; 246 468 #dma-cells = <1>; 247 469 }; 248 470 249 471 mmc0: mmc@01c0f000 { 250 472 compatible = "allwinner,sun7i-a20-mmc"; 251 473 reg = <0x01c0f000 0x1000>; 252 - clocks = <&ahb1_gates 8>, 253 - <&mmc0_clk 0>, 254 - <&mmc0_clk 1>, 255 - <&mmc0_clk 2>; 474 + clocks = <&ccu CLK_AHB1_MMC0>, 475 + <&ccu CLK_MMC0>, 476 + <&ccu CLK_MMC0_OUTPUT>, 477 + <&ccu CLK_MMC0_SAMPLE>; 256 478 clock-names = "ahb", 257 479 "mmc", 258 480 "output", 259 481 "sample"; 260 - resets = <&ahb1_rst 8>; 482 + resets = <&ccu RST_AHB1_MMC0>; 261 483 reset-names = "ahb"; 262 484 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; 263 485 status = "disabled"; ··· 268 490 mmc1: mmc@01c10000 { 269 491 compatible = "allwinner,sun7i-a20-mmc"; 270 492 reg = <0x01c10000 0x1000>; 271 - clocks = <&ahb1_gates 9>, 272 - <&mmc1_clk 0>, 273 - <&mmc1_clk 1>, 274 - <&mmc1_clk 2>; 493 + clocks = <&ccu CLK_AHB1_MMC1>, 494 + <&ccu CLK_MMC1>, 495 + <&ccu CLK_MMC1_OUTPUT>, 496 + <&ccu CLK_MMC1_SAMPLE>; 275 497 clock-names = "ahb", 276 498 "mmc", 277 499 "output", 278 500 "sample"; 279 - resets = <&ahb1_rst 9>; 501 + resets = <&ccu RST_AHB1_MMC1>; 280 502 reset-names = "ahb"; 281 503 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; 282 504 status = "disabled"; ··· 287 509 mmc2: mmc@01c11000 { 288 510 compatible = "allwinner,sun7i-a20-mmc"; 289 511 reg = <0x01c11000 0x1000>; 290 - clocks = <&ahb1_gates 10>, 291 - <&mmc2_clk 0>, 292 - <&mmc2_clk 1>, 293 - <&mmc2_clk 2>; 512 + clocks = <&ccu CLK_AHB1_MMC2>, 513 + <&ccu CLK_MMC2>, 514 + <&ccu CLK_MMC2_OUTPUT>, 515 + <&ccu CLK_MMC2_SAMPLE>; 294 516 clock-names = "ahb", 295 517 "mmc", 296 518 "output", 297 519 "sample"; 298 - resets = <&ahb1_rst 10>; 520 + resets = <&ccu RST_AHB1_MMC2>; 299 521 reset-names = "ahb"; 300 522 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; 301 523 status = "disabled"; ··· 306 528 mmc3: mmc@01c12000 { 307 529 compatible = "allwinner,sun7i-a20-mmc"; 308 530 reg = <0x01c12000 0x1000>; 309 - clocks = <&ahb1_gates 11>, 310 - <&mmc3_clk 0>, 311 - <&mmc3_clk 1>, 312 - <&mmc3_clk 2>; 531 + clocks = <&ccu CLK_AHB1_MMC3>, 532 + <&ccu CLK_MMC3>, 533 + <&ccu CLK_MMC3_OUTPUT>, 534 + <&ccu CLK_MMC3_SAMPLE>; 313 535 clock-names = "ahb", 314 536 "mmc", 315 537 "output", 316 538 "sample"; 317 - resets = <&ahb1_rst 11>; 539 + resets = <&ccu RST_AHB1_MMC3>; 318 540 reset-names = "ahb"; 319 541 interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>; 320 542 status = "disabled"; ··· 325 547 usb_otg: usb@01c19000 { 326 548 compatible = "allwinner,sun6i-a31-musb"; 327 549 reg = <0x01c19000 0x0400>; 328 - clocks = <&ahb1_gates 24>; 329 - resets = <&ahb1_rst 24>; 550 + clocks = <&ccu CLK_AHB1_OTG>; 551 + resets = <&ccu RST_AHB1_OTG>; 330 552 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; 331 553 interrupt-names = "mc"; 332 554 phys = <&usbphy 0>; ··· 343 565 reg-names = "phy_ctrl", 344 566 "pmu1", 345 567 "pmu2"; 346 - clocks = <&usb_clk 8>, 347 - <&usb_clk 9>, 348 - <&usb_clk 10>; 568 + clocks = <&ccu CLK_USB_PHY0>, 569 + <&ccu CLK_USB_PHY1>, 570 + <&ccu CLK_USB_PHY2>; 349 571 clock-names = "usb0_phy", 350 572 "usb1_phy", 351 573 "usb2_phy"; 352 - resets = <&usb_clk 0>, 353 - <&usb_clk 1>, 354 - <&usb_clk 2>; 574 + resets = <&ccu RST_USB_PHY0>, 575 + <&ccu RST_USB_PHY1>, 576 + <&ccu RST_USB_PHY2>; 355 577 reset-names = "usb0_reset", 356 578 "usb1_reset", 357 579 "usb2_reset"; ··· 363 585 compatible = "allwinner,sun6i-a31-ehci", "generic-ehci"; 364 586 reg = <0x01c1a000 0x100>; 365 587 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; 366 - clocks = <&ahb1_gates 26>; 367 - resets = <&ahb1_rst 26>; 588 + clocks = <&ccu CLK_AHB1_EHCI0>; 589 + resets = <&ccu RST_AHB1_EHCI0>; 368 590 phys = <&usbphy 1>; 369 591 phy-names = "usb"; 370 592 status = "disabled"; ··· 374 596 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; 375 597 reg = <0x01c1a400 0x100>; 376 598 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; 377 - clocks = <&ahb1_gates 29>, <&usb_clk 16>; 378 - resets = <&ahb1_rst 29>; 599 + clocks = <&ccu CLK_AHB1_OHCI0>, <&ccu CLK_USB_OHCI0>; 600 + resets = <&ccu RST_AHB1_OHCI0>; 379 601 phys = <&usbphy 1>; 380 602 phy-names = "usb"; 381 603 status = "disabled"; ··· 385 607 compatible = "allwinner,sun6i-a31-ehci", "generic-ehci"; 386 608 reg = <0x01c1b000 0x100>; 387 609 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; 388 - clocks = <&ahb1_gates 27>; 389 - resets = <&ahb1_rst 27>; 610 + clocks = <&ccu CLK_AHB1_EHCI1>; 611 + resets = <&ccu RST_AHB1_EHCI1>; 390 612 phys = <&usbphy 2>; 391 613 phy-names = "usb"; 392 614 status = "disabled"; ··· 396 618 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; 397 619 reg = <0x01c1b400 0x100>; 398 620 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; 399 - clocks = <&ahb1_gates 30>, <&usb_clk 17>; 400 - resets = <&ahb1_rst 30>; 621 + clocks = <&ccu CLK_AHB1_OHCI1>, <&ccu CLK_USB_OHCI1>; 622 + resets = <&ccu RST_AHB1_OHCI1>; 401 623 phys = <&usbphy 2>; 402 624 phy-names = "usb"; 403 625 status = "disabled"; ··· 407 629 compatible = "allwinner,sun6i-a31-ohci", "generic-ohci"; 408 630 reg = <0x01c1c400 0x100>; 409 631 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>; 410 - clocks = <&ahb1_gates 31>, <&usb_clk 18>; 411 - resets = <&ahb1_rst 31>; 632 + clocks = <&ccu CLK_AHB1_OHCI2>, <&ccu CLK_USB_OHCI2>; 633 + resets = <&ccu RST_AHB1_OHCI2>; 412 634 status = "disabled"; 635 + }; 636 + 637 + ccu: clock@01c20000 { 638 + compatible = "allwinner,sun6i-a31-ccu"; 639 + reg = <0x01c20000 0x400>; 640 + clocks = <&osc24M>, <&osc32k>; 641 + clock-names = "hosc", "losc"; 642 + #clock-cells = <1>; 643 + #reset-cells = <1>; 413 644 }; 414 645 415 646 pio: pinctrl@01c20800 { ··· 428 641 <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>, 429 642 <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>, 430 643 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; 431 - clocks = <&apb1_gates 5>; 644 + clocks = <&ccu CLK_APB1_PIO>; 432 645 gpio-controller; 433 646 interrupt-controller; 434 647 #interrupt-cells = <3>; ··· 549 762 }; 550 763 }; 551 764 552 - ahb1_rst: reset@01c202c0 { 553 - #reset-cells = <1>; 554 - compatible = "allwinner,sun6i-a31-ahb1-reset"; 555 - reg = <0x01c202c0 0xc>; 556 - }; 557 - 558 - apb1_rst: reset@01c202d0 { 559 - #reset-cells = <1>; 560 - compatible = "allwinner,sun6i-a31-clock-reset"; 561 - reg = <0x01c202d0 0x4>; 562 - }; 563 - 564 - apb2_rst: reset@01c202d8 { 565 - #reset-cells = <1>; 566 - compatible = "allwinner,sun6i-a31-clock-reset"; 567 - reg = <0x01c202d8 0x4>; 568 - }; 569 - 570 765 timer@01c20c00 { 571 766 compatible = "allwinner,sun4i-a10-timer"; 572 767 reg = <0x01c20c00 0xa0>; ··· 585 816 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; 586 817 reg-shift = <2>; 587 818 reg-io-width = <4>; 588 - clocks = <&apb2_gates 16>; 589 - resets = <&apb2_rst 16>; 819 + clocks = <&ccu CLK_APB2_UART0>; 820 + resets = <&ccu RST_APB2_UART0>; 590 821 dmas = <&dma 6>, <&dma 6>; 591 822 dma-names = "rx", "tx"; 592 823 status = "disabled"; ··· 598 829 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; 599 830 reg-shift = <2>; 600 831 reg-io-width = <4>; 601 - clocks = <&apb2_gates 17>; 602 - resets = <&apb2_rst 17>; 832 + clocks = <&ccu CLK_APB2_UART1>; 833 + resets = <&ccu RST_APB2_UART1>; 603 834 dmas = <&dma 7>, <&dma 7>; 604 835 dma-names = "rx", "tx"; 605 836 status = "disabled"; ··· 611 842 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; 612 843 reg-shift = <2>; 613 844 reg-io-width = <4>; 614 - clocks = <&apb2_gates 18>; 615 - resets = <&apb2_rst 18>; 845 + clocks = <&ccu CLK_APB2_UART2>; 846 + resets = <&ccu RST_APB2_UART2>; 616 847 dmas = <&dma 8>, <&dma 8>; 617 848 dma-names = "rx", "tx"; 618 849 status = "disabled"; ··· 624 855 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 625 856 reg-shift = <2>; 626 857 reg-io-width = <4>; 627 - clocks = <&apb2_gates 19>; 628 - resets = <&apb2_rst 19>; 858 + clocks = <&ccu CLK_APB2_UART3>; 859 + resets = <&ccu RST_APB2_UART3>; 629 860 dmas = <&dma 9>, <&dma 9>; 630 861 dma-names = "rx", "tx"; 631 862 status = "disabled"; ··· 637 868 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; 638 869 reg-shift = <2>; 639 870 reg-io-width = <4>; 640 - clocks = <&apb2_gates 20>; 641 - resets = <&apb2_rst 20>; 871 + clocks = <&ccu CLK_APB2_UART4>; 872 + resets = <&ccu RST_APB2_UART4>; 642 873 dmas = <&dma 10>, <&dma 10>; 643 874 dma-names = "rx", "tx"; 644 875 status = "disabled"; ··· 650 881 interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>; 651 882 reg-shift = <2>; 652 883 reg-io-width = <4>; 653 - clocks = <&apb2_gates 21>; 654 - resets = <&apb2_rst 21>; 884 + clocks = <&ccu CLK_APB2_UART5>; 885 + resets = <&ccu RST_APB2_UART5>; 655 886 dmas = <&dma 22>, <&dma 22>; 656 887 dma-names = "rx", "tx"; 657 888 status = "disabled"; ··· 661 892 compatible = "allwinner,sun6i-a31-i2c"; 662 893 reg = <0x01c2ac00 0x400>; 663 894 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; 664 - clocks = <&apb2_gates 0>; 665 - resets = <&apb2_rst 0>; 895 + clocks = <&ccu CLK_APB2_I2C0>; 896 + resets = <&ccu RST_APB2_I2C0>; 666 897 status = "disabled"; 667 898 #address-cells = <1>; 668 899 #size-cells = <0>; ··· 672 903 compatible = "allwinner,sun6i-a31-i2c"; 673 904 reg = <0x01c2b000 0x400>; 674 905 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 675 - clocks = <&apb2_gates 1>; 676 - resets = <&apb2_rst 1>; 906 + clocks = <&ccu CLK_APB2_I2C1>; 907 + resets = <&ccu RST_APB2_I2C1>; 677 908 status = "disabled"; 678 909 #address-cells = <1>; 679 910 #size-cells = <0>; ··· 683 914 compatible = "allwinner,sun6i-a31-i2c"; 684 915 reg = <0x01c2b400 0x400>; 685 916 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; 686 - clocks = <&apb2_gates 2>; 687 - resets = <&apb2_rst 2>; 917 + clocks = <&ccu CLK_APB2_I2C2>; 918 + resets = <&ccu RST_APB2_I2C2>; 688 919 status = "disabled"; 689 920 #address-cells = <1>; 690 921 #size-cells = <0>; ··· 694 925 compatible = "allwinner,sun6i-a31-i2c"; 695 926 reg = <0x01c2b800 0x400>; 696 927 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; 697 - clocks = <&apb2_gates 3>; 698 - resets = <&apb2_rst 3>; 928 + clocks = <&ccu CLK_APB2_I2C3>; 929 + resets = <&ccu RST_APB2_I2C3>; 699 930 status = "disabled"; 700 931 #address-cells = <1>; 701 932 #size-cells = <0>; ··· 706 937 reg = <0x01c30000 0x1054>; 707 938 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 708 939 interrupt-names = "macirq"; 709 - clocks = <&ahb1_gates 17>, <&gmac_tx_clk>; 940 + clocks = <&ccu CLK_AHB1_EMAC>, <&gmac_tx_clk>; 710 941 clock-names = "stmmaceth", "allwinner_gmac_tx"; 711 - resets = <&ahb1_rst 17>; 942 + resets = <&ccu RST_AHB1_EMAC>; 712 943 reset-names = "stmmaceth"; 713 944 snps,pbl = <2>; 714 945 snps,fixed-burst; ··· 722 953 compatible = "allwinner,sun4i-a10-crypto"; 723 954 reg = <0x01c15000 0x1000>; 724 955 interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>; 725 - clocks = <&ahb1_gates 5>, <&ss_clk>; 956 + clocks = <&ccu CLK_AHB1_SS>, <&ccu CLK_SS>; 726 957 clock-names = "ahb", "mod"; 727 - resets = <&ahb1_rst 5>; 958 + resets = <&ccu RST_AHB1_SS>; 728 959 reset-names = "ahb"; 729 960 }; 730 961 ··· 736 967 <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>, 737 968 <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>, 738 969 <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; 739 - clocks = <&ahb1_gates 19>; 740 - resets = <&ahb1_rst 19>; 970 + clocks = <&ccu CLK_AHB1_HSTIMER>; 971 + resets = <&ccu RST_AHB1_HSTIMER>; 741 972 }; 742 973 743 974 spi0: spi@01c68000 { 744 975 compatible = "allwinner,sun6i-a31-spi"; 745 976 reg = <0x01c68000 0x1000>; 746 977 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; 747 - clocks = <&ahb1_gates 20>, <&spi0_clk>; 978 + clocks = <&ccu CLK_AHB1_SPI0>, <&ccu CLK_SPI0>; 748 979 clock-names = "ahb", "mod"; 749 980 dmas = <&dma 23>, <&dma 23>; 750 981 dma-names = "rx", "tx"; 751 - resets = <&ahb1_rst 20>; 982 + resets = <&ccu RST_AHB1_SPI0>; 752 983 status = "disabled"; 753 984 }; 754 985 ··· 756 987 compatible = "allwinner,sun6i-a31-spi"; 757 988 reg = <0x01c69000 0x1000>; 758 989 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>; 759 - clocks = <&ahb1_gates 21>, <&spi1_clk>; 990 + clocks = <&ccu CLK_AHB1_SPI1>, <&ccu CLK_SPI1>; 760 991 clock-names = "ahb", "mod"; 761 992 dmas = <&dma 24>, <&dma 24>; 762 993 dma-names = "rx", "tx"; 763 - resets = <&ahb1_rst 21>; 994 + resets = <&ccu RST_AHB1_SPI1>; 764 995 status = "disabled"; 765 996 }; 766 997 ··· 768 999 compatible = "allwinner,sun6i-a31-spi"; 769 1000 reg = <0x01c6a000 0x1000>; 770 1001 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; 771 - clocks = <&ahb1_gates 22>, <&spi2_clk>; 1002 + clocks = <&ccu CLK_AHB1_SPI2>, <&ccu CLK_SPI2>; 772 1003 clock-names = "ahb", "mod"; 773 1004 dmas = <&dma 25>, <&dma 25>; 774 1005 dma-names = "rx", "tx"; 775 - resets = <&ahb1_rst 22>; 1006 + resets = <&ccu RST_AHB1_SPI2>; 776 1007 status = "disabled"; 777 1008 }; 778 1009 ··· 780 1011 compatible = "allwinner,sun6i-a31-spi"; 781 1012 reg = <0x01c6b000 0x1000>; 782 1013 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; 783 - clocks = <&ahb1_gates 23>, <&spi3_clk>; 1014 + clocks = <&ccu CLK_AHB1_SPI3>, <&ccu CLK_SPI3>; 784 1015 clock-names = "ahb", "mod"; 785 1016 dmas = <&dma 26>, <&dma 26>; 786 1017 dma-names = "rx", "tx"; 787 - resets = <&ahb1_rst 23>; 1018 + resets = <&ccu RST_AHB1_SPI3>; 788 1019 status = "disabled"; 789 1020 }; 790 1021 ··· 821 1052 ar100: ar100_clk { 822 1053 compatible = "allwinner,sun6i-a31-ar100-clk"; 823 1054 #clock-cells = <0>; 824 - clocks = <&osc32k>, <&osc24M>, <&pll6 0>, 825 - <&pll6 0>; 1055 + clocks = <&osc32k>, <&osc24M>, 1056 + <&ccu CLK_PLL_PERIPH>, 1057 + <&ccu CLK_PLL_PERIPH>; 826 1058 clock-output-names = "ar100"; 827 1059 }; 828 1060
+102 -203
arch/arm/boot/dts/sun8i-a23-a33.dtsi
··· 46 46 47 47 #include <dt-bindings/interrupt-controller/arm-gic.h> 48 48 49 + #include <dt-bindings/clock/sun8i-a23-a33-ccu.h> 49 50 #include <dt-bindings/pinctrl/sun4i-a10.h> 51 + #include <dt-bindings/reset/sun8i-a23-a33-ccu.h> 50 52 51 53 / { 52 54 interrupt-parent = <&gic>; ··· 62 60 compatible = "allwinner,simple-framebuffer", 63 61 "simple-framebuffer"; 64 62 allwinner,pipeline = "de_be0-lcd0"; 65 - clocks = <&pll6 0>; 63 + clocks = <&ccu CLK_BUS_LCD>, <&ccu CLK_BUS_DE_BE>, 64 + <&ccu CLK_LCD_CH0>, <&ccu CLK_DE_BE>, 65 + <&ccu CLK_DRAM_DE_BE>, <&ccu CLK_DRC>; 66 66 status = "disabled"; 67 67 }; 68 68 }; ··· 115 111 clock-frequency = <32768>; 116 112 clock-output-names = "osc32k"; 117 113 }; 118 - 119 - pll1: clk@01c20000 { 120 - #clock-cells = <0>; 121 - compatible = "allwinner,sun8i-a23-pll1-clk"; 122 - reg = <0x01c20000 0x4>; 123 - clocks = <&osc24M>; 124 - clock-output-names = "pll1"; 125 - }; 126 - 127 - /* dummy clock until actually implemented */ 128 - pll5: pll5_clk { 129 - #clock-cells = <0>; 130 - compatible = "fixed-clock"; 131 - clock-frequency = <0>; 132 - clock-output-names = "pll5"; 133 - }; 134 - 135 - pll6: clk@01c20028 { 136 - #clock-cells = <1>; 137 - compatible = "allwinner,sun6i-a31-pll6-clk"; 138 - reg = <0x01c20028 0x4>; 139 - clocks = <&osc24M>; 140 - clock-output-names = "pll6", "pll6x2"; 141 - }; 142 - 143 - cpu: cpu_clk@01c20050 { 144 - #clock-cells = <0>; 145 - compatible = "allwinner,sun4i-a10-cpu-clk"; 146 - reg = <0x01c20050 0x4>; 147 - 148 - /* 149 - * PLL1 is listed twice here. 150 - * While it looks suspicious, it's actually documented 151 - * that way both in the datasheet and in the code from 152 - * Allwinner. 153 - */ 154 - clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>; 155 - clock-output-names = "cpu"; 156 - }; 157 - 158 - axi: axi_clk@01c20050 { 159 - #clock-cells = <0>; 160 - compatible = "allwinner,sun8i-a23-axi-clk"; 161 - reg = <0x01c20050 0x4>; 162 - clocks = <&cpu>; 163 - clock-output-names = "axi"; 164 - }; 165 - 166 - ahb1: ahb1_clk@01c20054 { 167 - #clock-cells = <0>; 168 - compatible = "allwinner,sun6i-a31-ahb1-clk"; 169 - reg = <0x01c20054 0x4>; 170 - clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>; 171 - clock-output-names = "ahb1"; 172 - }; 173 - 174 - apb1: apb1_clk@01c20054 { 175 - #clock-cells = <0>; 176 - compatible = "allwinner,sun4i-a10-apb0-clk"; 177 - reg = <0x01c20054 0x4>; 178 - clocks = <&ahb1>; 179 - clock-output-names = "apb1"; 180 - }; 181 - 182 - apb1_gates: clk@01c20068 { 183 - #clock-cells = <1>; 184 - compatible = "allwinner,sun8i-a23-apb1-gates-clk"; 185 - reg = <0x01c20068 0x4>; 186 - clocks = <&apb1>; 187 - clock-indices = <0>, <5>, 188 - <12>, <13>; 189 - clock-output-names = "apb1_codec", "apb1_pio", 190 - "apb1_daudio0", "apb1_daudio1"; 191 - }; 192 - 193 - apb2: clk@01c20058 { 194 - #clock-cells = <0>; 195 - compatible = "allwinner,sun4i-a10-apb1-clk"; 196 - reg = <0x01c20058 0x4>; 197 - clocks = <&osc32k>, <&osc24M>, <&pll6 0>, <&pll6 0>; 198 - clock-output-names = "apb2"; 199 - }; 200 - 201 - apb2_gates: clk@01c2006c { 202 - #clock-cells = <1>; 203 - compatible = "allwinner,sun8i-a23-apb2-gates-clk"; 204 - reg = <0x01c2006c 0x4>; 205 - clocks = <&apb2>; 206 - clock-indices = <0>, <1>, 207 - <2>, <16>, 208 - <17>, <18>, 209 - <19>, <20>; 210 - clock-output-names = "apb2_i2c0", "apb2_i2c1", 211 - "apb2_i2c2", "apb2_uart0", 212 - "apb2_uart1", "apb2_uart2", 213 - "apb2_uart3", "apb2_uart4"; 214 - }; 215 - 216 - mmc0_clk: clk@01c20088 { 217 - #clock-cells = <1>; 218 - compatible = "allwinner,sun4i-a10-mmc-clk"; 219 - reg = <0x01c20088 0x4>; 220 - clocks = <&osc24M>, <&pll6 0>; 221 - clock-output-names = "mmc0", 222 - "mmc0_output", 223 - "mmc0_sample"; 224 - }; 225 - 226 - mmc1_clk: clk@01c2008c { 227 - #clock-cells = <1>; 228 - compatible = "allwinner,sun4i-a10-mmc-clk"; 229 - reg = <0x01c2008c 0x4>; 230 - clocks = <&osc24M>, <&pll6 0>; 231 - clock-output-names = "mmc1", 232 - "mmc1_output", 233 - "mmc1_sample"; 234 - }; 235 - 236 - mmc2_clk: clk@01c20090 { 237 - #clock-cells = <1>; 238 - compatible = "allwinner,sun4i-a10-mmc-clk"; 239 - reg = <0x01c20090 0x4>; 240 - clocks = <&osc24M>, <&pll6 0>; 241 - clock-output-names = "mmc2", 242 - "mmc2_output", 243 - "mmc2_sample"; 244 - }; 245 - 246 - nand_clk: clk@01c20080 { 247 - #clock-cells = <0>; 248 - compatible = "allwinner,sun4i-a10-mod0-clk"; 249 - reg = <0x01c20080 0x4>; 250 - clocks = <&osc24M>, <&pll6 1>; 251 - clock-output-names = "nand"; 252 - }; 253 - 254 - usb_clk: clk@01c200cc { 255 - #clock-cells = <1>; 256 - #reset-cells = <1>; 257 - compatible = "allwinner,sun8i-a23-usb-clk"; 258 - reg = <0x01c200cc 0x4>; 259 - clocks = <&osc24M>; 260 - clock-output-names = "usb_phy0", "usb_phy1", "usb_hsic", 261 - "usb_hsic_12M", "usb_ohci0"; 262 - }; 263 114 }; 264 115 265 116 soc@01c00000 { ··· 127 268 compatible = "allwinner,sun8i-a23-dma"; 128 269 reg = <0x01c02000 0x1000>; 129 270 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; 130 - clocks = <&ahb1_gates 6>; 131 - resets = <&ahb1_rst 6>; 271 + clocks = <&ccu CLK_BUS_DMA>; 272 + resets = <&ccu RST_BUS_DMA>; 132 273 #dma-cells = <1>; 133 274 }; 134 275 135 276 mmc0: mmc@01c0f000 { 136 277 compatible = "allwinner,sun7i-a20-mmc"; 137 278 reg = <0x01c0f000 0x1000>; 138 - clocks = <&ahb1_gates 8>, 139 - <&mmc0_clk 0>, 140 - <&mmc0_clk 1>, 141 - <&mmc0_clk 2>; 279 + clocks = <&ccu CLK_BUS_MMC0>, 280 + <&ccu CLK_MMC0>, 281 + <&ccu CLK_MMC0_OUTPUT>, 282 + <&ccu CLK_MMC0_SAMPLE>; 142 283 clock-names = "ahb", 143 284 "mmc", 144 285 "output", 145 286 "sample"; 146 - resets = <&ahb1_rst 8>; 287 + resets = <&ccu RST_BUS_MMC0>; 147 288 reset-names = "ahb"; 148 289 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; 149 290 status = "disabled"; ··· 154 295 mmc1: mmc@01c10000 { 155 296 compatible = "allwinner,sun7i-a20-mmc"; 156 297 reg = <0x01c10000 0x1000>; 157 - clocks = <&ahb1_gates 9>, 158 - <&mmc1_clk 0>, 159 - <&mmc1_clk 1>, 160 - <&mmc1_clk 2>; 298 + clocks = <&ccu CLK_BUS_MMC1>, 299 + <&ccu CLK_MMC1>, 300 + <&ccu CLK_MMC1_OUTPUT>, 301 + <&ccu CLK_MMC1_SAMPLE>; 161 302 clock-names = "ahb", 162 303 "mmc", 163 304 "output", 164 305 "sample"; 165 - resets = <&ahb1_rst 9>; 306 + resets = <&ccu RST_BUS_MMC1>; 166 307 reset-names = "ahb"; 167 308 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; 168 309 status = "disabled"; ··· 173 314 mmc2: mmc@01c11000 { 174 315 compatible = "allwinner,sun7i-a20-mmc"; 175 316 reg = <0x01c11000 0x1000>; 176 - clocks = <&ahb1_gates 10>, 177 - <&mmc2_clk 0>, 178 - <&mmc2_clk 1>, 179 - <&mmc2_clk 2>; 317 + clocks = <&ccu CLK_BUS_MMC2>, 318 + <&ccu CLK_MMC2>, 319 + <&ccu CLK_MMC2_OUTPUT>, 320 + <&ccu CLK_MMC2_SAMPLE>; 180 321 clock-names = "ahb", 181 322 "mmc", 182 323 "output", 183 324 "sample"; 184 - resets = <&ahb1_rst 10>; 325 + resets = <&ccu RST_BUS_MMC2>; 185 326 reset-names = "ahb"; 186 327 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; 187 328 status = "disabled"; ··· 193 334 compatible = "allwinner,sun4i-a10-nand"; 194 335 reg = <0x01c03000 0x1000>; 195 336 interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>; 196 - clocks = <&ahb1_gates 13>, <&nand_clk>; 337 + clocks = <&ccu CLK_BUS_NAND>, <&ccu CLK_NAND>; 197 338 clock-names = "ahb", "mod"; 198 - resets = <&ahb1_rst 13>; 339 + resets = <&ccu RST_BUS_NAND>; 199 340 reset-names = "ahb"; 200 341 status = "disabled"; 201 342 #address-cells = <1>; 202 343 #size-cells = <0>; 203 344 }; 204 345 346 + usb_otg: usb@01c19000 { 347 + /* compatible gets set in SoC specific dtsi file */ 348 + reg = <0x01c19000 0x0400>; 349 + clocks = <&ccu CLK_BUS_OTG>; 350 + resets = <&ccu RST_BUS_OTG>; 351 + interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; 352 + interrupt-names = "mc"; 353 + phys = <&usbphy 0>; 354 + phy-names = "usb"; 355 + extcon = <&usbphy 0>; 356 + status = "disabled"; 357 + }; 358 + 359 + usbphy: phy@01c19400 { 360 + /* 361 + * compatible and address regions get set in 362 + * SoC specific dtsi file 363 + */ 364 + clocks = <&ccu CLK_USB_PHY0>, 365 + <&ccu CLK_USB_PHY1>; 366 + clock-names = "usb0_phy", 367 + "usb1_phy"; 368 + resets = <&ccu RST_USB_PHY0>, 369 + <&ccu RST_USB_PHY1>; 370 + reset-names = "usb0_reset", 371 + "usb1_reset"; 372 + status = "disabled"; 373 + #phy-cells = <1>; 374 + }; 375 + 205 376 ehci0: usb@01c1a000 { 206 377 compatible = "allwinner,sun8i-a23-ehci", "generic-ehci"; 207 378 reg = <0x01c1a000 0x100>; 208 379 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; 209 - clocks = <&ahb1_gates 26>; 210 - resets = <&ahb1_rst 26>; 380 + clocks = <&ccu CLK_BUS_EHCI>; 381 + resets = <&ccu RST_BUS_EHCI>; 211 382 phys = <&usbphy 1>; 212 383 phy-names = "usb"; 213 384 status = "disabled"; ··· 247 358 compatible = "allwinner,sun8i-a23-ohci", "generic-ohci"; 248 359 reg = <0x01c1a400 0x100>; 249 360 interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; 250 - clocks = <&ahb1_gates 29>, <&usb_clk 16>; 251 - resets = <&ahb1_rst 29>; 361 + clocks = <&ccu CLK_BUS_OHCI>, <&ccu CLK_USB_OHCI>; 362 + resets = <&ccu RST_BUS_OHCI>; 252 363 phys = <&usbphy 1>; 253 364 phy-names = "usb"; 254 365 status = "disabled"; 366 + }; 367 + 368 + ccu: clock@01c20000 { 369 + reg = <0x01c20000 0x400>; 370 + clocks = <&osc24M>, <&osc32k>; 371 + clock-names = "hosc", "losc"; 372 + #clock-cells = <1>; 373 + #reset-cells = <1>; 255 374 }; 256 375 257 376 pio: pinctrl@01c20800 { 258 377 /* compatible gets set in SoC specific dtsi file */ 259 378 reg = <0x01c20800 0x400>; 260 379 /* interrupts get set in SoC specific dtsi file */ 261 - clocks = <&apb1_gates 5>; 380 + clocks = <&ccu CLK_BUS_PIO>; 262 381 gpio-controller; 263 382 interrupt-controller; 264 383 #interrupt-cells = <3>; ··· 277 380 allwinner,function = "uart0"; 278 381 allwinner,drive = <SUN4I_PINCTRL_10_MA>; 279 382 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 383 + }; 384 + 385 + uart1_pins_a: uart1@0 { 386 + allwinner,pins = "PG6", "PG7"; 387 + allwinner,function = "uart1"; 388 + }; 389 + 390 + uart1_pins_cts_rts_a: uart1-cts-rts@0 { 391 + allwinner,pins = "PG8", "PG9"; 392 + allwinner,function = "uart1"; 280 393 }; 281 394 282 395 mmc0_pins_a: mmc0@0 { ··· 342 435 allwinner,drive = <SUN4I_PINCTRL_10_MA>; 343 436 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 344 437 }; 345 - }; 346 438 347 - ahb1_rst: reset@01c202c0 { 348 - #reset-cells = <1>; 349 - compatible = "allwinner,sun6i-a31-clock-reset"; 350 - reg = <0x01c202c0 0xc>; 351 - }; 352 - 353 - apb1_rst: reset@01c202d0 { 354 - #reset-cells = <1>; 355 - compatible = "allwinner,sun6i-a31-clock-reset"; 356 - reg = <0x01c202d0 0x4>; 357 - }; 358 - 359 - apb2_rst: reset@01c202d8 { 360 - #reset-cells = <1>; 361 - compatible = "allwinner,sun6i-a31-clock-reset"; 362 - reg = <0x01c202d8 0x4>; 439 + lcd_rgb666_pins: lcd-rgb666@0 { 440 + allwinner,pins = "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", 441 + "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", 442 + "PD18", "PD19", "PD20", "PD21", "PD22", "PD23", 443 + "PD24", "PD25", "PD26", "PD27"; 444 + allwinner,function = "lcd0"; 445 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 446 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 447 + }; 363 448 }; 364 449 365 450 timer@01c20c00 { ··· 389 490 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; 390 491 reg-shift = <2>; 391 492 reg-io-width = <4>; 392 - clocks = <&apb2_gates 16>; 393 - resets = <&apb2_rst 16>; 493 + clocks = <&ccu CLK_BUS_UART0>; 494 + resets = <&ccu RST_BUS_UART0>; 394 495 dmas = <&dma 6>, <&dma 6>; 395 496 dma-names = "rx", "tx"; 396 497 status = "disabled"; ··· 402 503 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; 403 504 reg-shift = <2>; 404 505 reg-io-width = <4>; 405 - clocks = <&apb2_gates 17>; 406 - resets = <&apb2_rst 17>; 506 + clocks = <&ccu CLK_BUS_UART1>; 507 + resets = <&ccu RST_BUS_UART1>; 407 508 dmas = <&dma 7>, <&dma 7>; 408 509 dma-names = "rx", "tx"; 409 510 status = "disabled"; ··· 415 516 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; 416 517 reg-shift = <2>; 417 518 reg-io-width = <4>; 418 - clocks = <&apb2_gates 18>; 419 - resets = <&apb2_rst 18>; 519 + clocks = <&ccu CLK_BUS_UART2>; 520 + resets = <&ccu RST_BUS_UART2>; 420 521 dmas = <&dma 8>, <&dma 8>; 421 522 dma-names = "rx", "tx"; 422 523 status = "disabled"; ··· 428 529 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 429 530 reg-shift = <2>; 430 531 reg-io-width = <4>; 431 - clocks = <&apb2_gates 19>; 432 - resets = <&apb2_rst 19>; 532 + clocks = <&ccu CLK_BUS_UART3>; 533 + resets = <&ccu RST_BUS_UART3>; 433 534 dmas = <&dma 9>, <&dma 9>; 434 535 dma-names = "rx", "tx"; 435 536 status = "disabled"; ··· 441 542 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; 442 543 reg-shift = <2>; 443 544 reg-io-width = <4>; 444 - clocks = <&apb2_gates 20>; 445 - resets = <&apb2_rst 20>; 545 + clocks = <&ccu CLK_BUS_UART4>; 546 + resets = <&ccu RST_BUS_UART4>; 446 547 dmas = <&dma 10>, <&dma 10>; 447 548 dma-names = "rx", "tx"; 448 549 status = "disabled"; ··· 452 553 compatible = "allwinner,sun6i-a31-i2c"; 453 554 reg = <0x01c2ac00 0x400>; 454 555 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; 455 - clocks = <&apb2_gates 0>; 456 - resets = <&apb2_rst 0>; 556 + clocks = <&ccu CLK_BUS_I2C0>; 557 + resets = <&ccu RST_BUS_I2C0>; 457 558 status = "disabled"; 458 559 #address-cells = <1>; 459 560 #size-cells = <0>; ··· 463 564 compatible = "allwinner,sun6i-a31-i2c"; 464 565 reg = <0x01c2b000 0x400>; 465 566 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 466 - clocks = <&apb2_gates 1>; 467 - resets = <&apb2_rst 1>; 567 + clocks = <&ccu CLK_BUS_I2C1>; 568 + resets = <&ccu RST_BUS_I2C1>; 468 569 status = "disabled"; 469 570 #address-cells = <1>; 470 571 #size-cells = <0>; ··· 474 575 compatible = "allwinner,sun6i-a31-i2c"; 475 576 reg = <0x01c2b400 0x400>; 476 577 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; 477 - clocks = <&apb2_gates 2>; 478 - resets = <&apb2_rst 2>; 578 + clocks = <&ccu CLK_BUS_I2C2>; 579 + resets = <&ccu RST_BUS_I2C2>; 479 580 status = "disabled"; 480 581 #address-cells = <1>; 481 582 #size-cells = <0>;
+9
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts
··· 53 53 status = "okay"; 54 54 }; 55 55 56 + &touchscreen { 57 + reg = <0x40>; 58 + compatible = "silead,gsl3675"; 59 + firmware-name = "gsl3675-gt90h.fw"; 60 + touchscreen-size-x = <1792>; 61 + touchscreen-size-y = <1024>; 62 + status = "okay"; 63 + }; 64 + 56 65 &lradc { 57 66 button@600 { 58 67 label = "Back";
+9
arch/arm/boot/dts/sun8i-a23-inet86dz.dts
··· 53 53 status = "okay"; 54 54 }; 55 55 56 + &touchscreen { 57 + reg = <0x40>; 58 + compatible = "silead,gsl1680"; 59 + firmware-name = "gsl1680-inet86dz.fw"; 60 + touchscreen-size-x = <960>; 61 + touchscreen-size-y = <640>; 62 + status = "okay"; 63 + }; 64 + 56 65 &usbphy { 57 66 usb1_vbus-supply = <&reg_dldo1>; 58 67 };
+26
arch/arm/boot/dts/sun8i-a23-polaroid-mid2407pxe03.dts
··· 62 62 }; 63 63 }; 64 64 65 + &i2c1 { 66 + mma7660: accelerometer@4c { 67 + reg = <0x4c>; 68 + compatible = "fsl,mma7660"; 69 + }; 70 + }; 71 + 65 72 &mmc1 { 66 73 pinctrl-names = "default"; 67 74 pinctrl-0 = <&mmc1_pins_a>; ··· 96 89 allwinner,drive = <SUN4I_PINCTRL_10_MA>; 97 90 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 98 91 }; 92 + }; 93 + 94 + &reg_ldo_io1 { 95 + regulator-min-microvolt = <3300000>; 96 + regulator-max-microvolt = <3300000>; 97 + regulator-name = "vcc-touchscreen"; 98 + status = "okay"; 99 + }; 100 + 101 + &touchscreen { 102 + reg = <0x40>; 103 + compatible = "silead,gsl1680"; 104 + firmware-name = "gsl1680-polaroid-mid2407pxe03.fw"; 105 + touchscreen-size-x = <960>; 106 + touchscreen-size-y = <640>; 107 + touchscreen-inverted-x; 108 + touchscreen-inverted-y; 109 + vddio-supply = <&reg_ldo_io1>; 110 + status = "okay"; 99 111 };
+9
arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts
··· 90 90 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 91 91 }; 92 92 }; 93 + 94 + &touchscreen { 95 + reg = <0x40>; 96 + compatible = "silead,gsl3670"; 97 + firmware-name = "gsl3670-polaroid-mid2809pxe04.fw"; 98 + touchscreen-size-x = <1660>; 99 + touchscreen-size-y = <890>; 100 + status = "okay"; 101 + };
+13 -67
arch/arm/boot/dts/sun8i-a23.dtsi
··· 48 48 memory { 49 49 reg = <0x40000000 0x40000000>; 50 50 }; 51 + }; 51 52 52 - clocks { 53 - ahb1_gates: clk@01c20060 { 54 - #clock-cells = <1>; 55 - compatible = "allwinner,sun8i-a23-ahb1-gates-clk"; 56 - reg = <0x01c20060 0x8>; 57 - clocks = <&ahb1>; 58 - clock-indices = <1>, <6>, 59 - <8>, <9>, <10>, 60 - <13>, <14>, 61 - <19>, <20>, 62 - <21>, <24>, <26>, 63 - <29>, <32>, <36>, 64 - <40>, <44>, <46>, 65 - <52>, <53>, 66 - <54>, <57>; 67 - clock-output-names = "ahb1_mipidsi", "ahb1_dma", 68 - "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2", 69 - "ahb1_nand", "ahb1_sdram", 70 - "ahb1_hstimer", "ahb1_spi0", 71 - "ahb1_spi1", "ahb1_otg", "ahb1_ehci", 72 - "ahb1_ohci", "ahb1_ve", "ahb1_lcd", 73 - "ahb1_csi", "ahb1_be", "ahb1_fe", 74 - "ahb1_gpu", "ahb1_msgbox", 75 - "ahb1_spinlock", "ahb1_drc"; 76 - }; 77 - 78 - mbus_clk: clk@01c2015c { 79 - #clock-cells = <0>; 80 - compatible = "allwinner,sun8i-a23-mbus-clk"; 81 - reg = <0x01c2015c 0x4>; 82 - clocks = <&osc24M>, <&pll6 1>, <&pll5>; 83 - clock-output-names = "mbus"; 84 - }; 85 - }; 86 - 87 - soc@01c00000 { 88 - usb_otg: usb@01c19000 { 89 - compatible = "allwinner,sun6i-a31-musb"; 90 - reg = <0x01c19000 0x0400>; 91 - clocks = <&ahb1_gates 24>; 92 - resets = <&ahb1_rst 24>; 93 - interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; 94 - interrupt-names = "mc"; 95 - phys = <&usbphy 0>; 96 - phy-names = "usb"; 97 - extcon = <&usbphy 0>; 98 - status = "disabled"; 99 - }; 100 - 101 - usbphy: phy@01c19400 { 102 - compatible = "allwinner,sun8i-a23-usb-phy"; 103 - reg = <0x01c19400 0x10>, 104 - <0x01c1a800 0x4>; 105 - reg-names = "phy_ctrl", 106 - "pmu1"; 107 - clocks = <&usb_clk 8>, 108 - <&usb_clk 9>; 109 - clock-names = "usb0_phy", 110 - "usb1_phy"; 111 - resets = <&usb_clk 0>, 112 - <&usb_clk 1>; 113 - reset-names = "usb0_reset", 114 - "usb1_reset"; 115 - status = "disabled"; 116 - #phy-cells = <1>; 117 - }; 118 - }; 53 + &ccu { 54 + compatible = "allwinner,sun8i-a23-ccu"; 119 55 }; 120 56 121 57 &pio { ··· 59 123 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, 60 124 <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>, 61 125 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; 126 + }; 127 + 128 + &usb_otg { 129 + compatible = "allwinner,sun6i-a31-musb"; 130 + }; 131 + 132 + &usbphy { 133 + compatible = "allwinner,sun8i-a23-usb-phy"; 134 + reg = <0x01c19400 0x10>, <0x01c1a800 0x4>; 135 + reg-names = "phy_ctrl", "pmu1"; 62 136 };
+10
arch/arm/boot/dts/sun8i-a33-ga10h-v1.1.dts
··· 58 58 status = "okay"; 59 59 }; 60 60 61 + &touchscreen { 62 + reg = <0x40>; 63 + compatible = "silead,gsl3675"; 64 + firmware-name = "gsl3675-ga10h.fw"; 65 + touchscreen-size-x = <1630>; 66 + touchscreen-size-y = <990>; 67 + touchscreen-inverted-y; 68 + status = "okay"; 69 + }; 70 + 61 71 &lradc { 62 72 button@600 { 63 73 label = "Back";
+20
arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts
··· 49 49 model = "INet-D978 Rev 02"; 50 50 compatible = "primux,inet-d978-rev2", "allwinner,sun8i-a33"; 51 51 52 + aliases { 53 + serial0 = &uart1; 54 + }; 55 + 56 + chosen { 57 + /* Delete debug UART as serial0 is the UART for bluetooth */ 58 + /delete-property/stdout-path; 59 + }; 60 + 52 61 leds { 53 62 compatible = "gpio-leds"; 54 63 pinctrl-names = "default"; ··· 94 85 allwinner,drive = <SUN4I_PINCTRL_20_MA>; 95 86 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 96 87 }; 88 + }; 89 + 90 + &r_uart { 91 + status = "disabled"; 92 + }; 93 + 94 + &uart1 { 95 + pinctrl-names = "default"; 96 + pinctrl-0 = <&uart1_pins_a>, 97 + <&uart1_pins_cts_rts_a>; 98 + status = "okay"; 97 99 };
+163 -81
arch/arm/boot/dts/sun8i-a33.dtsi
··· 59 59 }; 60 60 }; 61 61 62 + de: display-engine { 63 + compatible = "allwinner,sun8i-a33-display-engine"; 64 + allwinner,pipelines = <&fe0>; 65 + status = "disabled"; 66 + }; 67 + 62 68 memory { 63 69 reg = <0x40000000 0x80000000>; 64 70 }; 65 71 66 - clocks { 67 - /* Dummy clock for pll11 (DDR1) until actually implemented */ 68 - pll11: pll11_clk { 69 - #clock-cells = <0>; 70 - compatible = "fixed-clock"; 71 - clock-frequency = <0>; 72 - clock-output-names = "pll11"; 73 - }; 74 - 75 - ahb1_gates: clk@01c20060 { 76 - #clock-cells = <1>; 77 - compatible = "allwinner,sun8i-a33-ahb1-gates-clk"; 78 - reg = <0x01c20060 0x8>; 79 - clocks = <&ahb1>; 80 - clock-indices = <1>, <5>, 81 - <6>, <8>, <9>, 82 - <10>, <13>, <14>, 83 - <19>, <20>, 84 - <21>, <24>, <26>, 85 - <29>, <32>, <36>, 86 - <40>, <44>, <46>, 87 - <52>, <53>, 88 - <54>, <57>, 89 - <58>; 90 - clock-output-names = "ahb1_mipidsi", "ahb1_ss", 91 - "ahb1_dma","ahb1_mmc0", "ahb1_mmc1", 92 - "ahb1_mmc2", "ahb1_nand", "ahb1_sdram", 93 - "ahb1_hstimer", "ahb1_spi0", 94 - "ahb1_spi1", "ahb1_otg", "ahb1_ehci", 95 - "ahb1_ohci", "ahb1_ve", "ahb1_lcd", 96 - "ahb1_csi", "ahb1_be", "ahb1_fe", 97 - "ahb1_gpu", "ahb1_msgbox", 98 - "ahb1_spinlock", "ahb1_drc", 99 - "ahb1_sat"; 100 - }; 101 - 102 - ss_clk: clk@01c2009c { 103 - #clock-cells = <0>; 104 - compatible = "allwinner,sun4i-a10-mod0-clk"; 105 - reg = <0x01c2009c 0x4>; 106 - clocks = <&osc24M>, <&pll6 0>; 107 - clock-output-names = "ss"; 108 - }; 109 - 110 - mbus_clk: clk@01c2015c { 111 - #clock-cells = <0>; 112 - compatible = "allwinner,sun8i-a23-mbus-clk"; 113 - reg = <0x01c2015c 0x4>; 114 - clocks = <&osc24M>, <&pll6 1>, <&pll5>, <&pll11>; 115 - clock-output-names = "mbus"; 116 - }; 117 - }; 118 - 119 72 soc@01c00000 { 73 + tcon0: lcd-controller@01c0c000 { 74 + compatible = "allwinner,sun8i-a33-tcon"; 75 + reg = <0x01c0c000 0x1000>; 76 + interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>; 77 + clocks = <&ccu CLK_BUS_LCD>, 78 + <&ccu CLK_LCD_CH0>; 79 + clock-names = "ahb", 80 + "tcon-ch0"; 81 + clock-output-names = "tcon-pixel-clock"; 82 + resets = <&ccu RST_BUS_LCD>; 83 + reset-names = "lcd"; 84 + status = "disabled"; 85 + 86 + ports { 87 + #address-cells = <1>; 88 + #size-cells = <0>; 89 + 90 + tcon0_in: port@0 { 91 + #address-cells = <1>; 92 + #size-cells = <0>; 93 + reg = <0>; 94 + 95 + tcon0_in_drc0: endpoint@0 { 96 + reg = <0>; 97 + remote-endpoint = <&drc0_out_tcon0>; 98 + }; 99 + }; 100 + 101 + tcon0_out: port@1 { 102 + #address-cells = <1>; 103 + #size-cells = <0>; 104 + reg = <1>; 105 + }; 106 + }; 107 + }; 108 + 120 109 crypto: crypto-engine@01c15000 { 121 110 compatible = "allwinner,sun4i-a10-crypto"; 122 111 reg = <0x01c15000 0x1000>; 123 112 interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>; 124 - clocks = <&ahb1_gates 5>, <&ss_clk>; 113 + clocks = <&ccu CLK_BUS_SS>, <&ccu CLK_SS>; 125 114 clock-names = "ahb", "mod"; 126 - resets = <&ahb1_rst 5>; 115 + resets = <&ccu RST_BUS_SS>; 127 116 reset-names = "ahb"; 128 117 }; 129 118 130 - usb_otg: usb@01c19000 { 131 - compatible = "allwinner,sun8i-a33-musb"; 132 - reg = <0x01c19000 0x0400>; 133 - clocks = <&ahb1_gates 24>; 134 - resets = <&ahb1_rst 24>; 135 - interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; 136 - interrupt-names = "mc"; 137 - phys = <&usbphy 0>; 138 - phy-names = "usb"; 139 - extcon = <&usbphy 0>; 119 + fe0: display-frontend@01e00000 { 120 + compatible = "allwinner,sun8i-a33-display-frontend"; 121 + reg = <0x01e00000 0x20000>; 122 + interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; 123 + clocks = <&ccu CLK_BUS_DE_FE>, <&ccu CLK_DE_FE>, 124 + <&ccu CLK_DRAM_DE_FE>; 125 + clock-names = "ahb", "mod", 126 + "ram"; 127 + resets = <&ccu RST_BUS_DE_FE>; 140 128 status = "disabled"; 129 + 130 + ports { 131 + #address-cells = <1>; 132 + #size-cells = <0>; 133 + 134 + fe0_out: port@1 { 135 + #address-cells = <1>; 136 + #size-cells = <0>; 137 + reg = <1>; 138 + 139 + fe0_out_be0: endpoint@0 { 140 + reg = <0>; 141 + remote-endpoint = <&be0_in_fe0>; 142 + }; 143 + }; 144 + }; 141 145 }; 142 146 143 - usbphy: phy@01c19400 { 144 - compatible = "allwinner,sun8i-a33-usb-phy"; 145 - reg = <0x01c19400 0x14>, 146 - <0x01c1a800 0x4>; 147 - reg-names = "phy_ctrl", 148 - "pmu1"; 149 - clocks = <&usb_clk 8>, 150 - <&usb_clk 9>; 151 - clock-names = "usb0_phy", 152 - "usb1_phy"; 153 - resets = <&usb_clk 0>, 154 - <&usb_clk 1>; 155 - reset-names = "usb0_reset", 156 - "usb1_reset"; 157 - status = "disabled"; 158 - #phy-cells = <1>; 147 + be0: display-backend@01e60000 { 148 + compatible = "allwinner,sun8i-a33-display-backend"; 149 + reg = <0x01e60000 0x10000>, <0x01e80000 0x1000>; 150 + reg-names = "be", "sat"; 151 + interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>; 152 + clocks = <&ccu CLK_BUS_DE_BE>, <&ccu CLK_DE_BE>, 153 + <&ccu CLK_DRAM_DE_BE>, <&ccu CLK_BUS_SAT>; 154 + clock-names = "ahb", "mod", 155 + "ram", "sat"; 156 + resets = <&ccu RST_BUS_DE_BE>, <&ccu RST_BUS_SAT>; 157 + reset-names = "be", "sat"; 158 + assigned-clocks = <&ccu CLK_DE_BE>; 159 + assigned-clock-rates = <300000000>; 160 + 161 + ports { 162 + #address-cells = <1>; 163 + #size-cells = <0>; 164 + 165 + be0_in: port@0 { 166 + #address-cells = <1>; 167 + #size-cells = <0>; 168 + reg = <0>; 169 + 170 + be0_in_fe0: endpoint@0 { 171 + reg = <0>; 172 + remote-endpoint = <&fe0_out_be0>; 173 + }; 174 + }; 175 + 176 + be0_out: port@1 { 177 + #address-cells = <1>; 178 + #size-cells = <0>; 179 + reg = <1>; 180 + 181 + be0_out_drc0: endpoint@0 { 182 + reg = <0>; 183 + remote-endpoint = <&drc0_in_be0>; 184 + }; 185 + }; 186 + }; 187 + }; 188 + 189 + drc0: drc@01e70000 { 190 + compatible = "allwinner,sun8i-a33-drc"; 191 + reg = <0x01e70000 0x10000>; 192 + interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; 193 + clocks = <&ccu CLK_BUS_DRC>, <&ccu CLK_DRC>, 194 + <&ccu CLK_DRAM_DRC>; 195 + clock-names = "ahb", "mod", "ram"; 196 + resets = <&ccu RST_BUS_DRC>; 197 + 198 + assigned-clocks = <&ccu CLK_DRC>; 199 + assigned-clock-rates = <300000000>; 200 + 201 + ports { 202 + #address-cells = <1>; 203 + #size-cells = <0>; 204 + 205 + drc0_in: port@0 { 206 + #address-cells = <1>; 207 + #size-cells = <0>; 208 + reg = <0>; 209 + 210 + drc0_in_be0: endpoint@0 { 211 + reg = <0>; 212 + remote-endpoint = <&be0_out_drc0>; 213 + }; 214 + }; 215 + 216 + drc0_out: port@1 { 217 + #address-cells = <1>; 218 + #size-cells = <0>; 219 + reg = <1>; 220 + 221 + drc0_out_tcon0: endpoint@0 { 222 + reg = <0>; 223 + remote-endpoint = <&tcon0_in_drc0>; 224 + }; 225 + }; 226 + }; 159 227 }; 160 228 }; 229 + }; 230 + 231 + &ccu { 232 + compatible = "allwinner,sun8i-a33-ccu"; 161 233 }; 162 234 163 235 &pio { ··· 244 172 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 245 173 }; 246 174 175 + }; 176 + 177 + &usb_otg { 178 + compatible = "allwinner,sun8i-a33-musb"; 179 + }; 180 + 181 + &usbphy { 182 + compatible = "allwinner,sun8i-a33-usb-phy"; 183 + reg = <0x01c19400 0x14>, <0x01c1a800 0x4>; 184 + reg-names = "phy_ctrl", "pmu1"; 247 185 };
+1 -1
arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
··· 185 185 186 186 &uart1 { 187 187 pinctrl-names = "default"; 188 - pinctrl-0 = <&uart1_pins_a>; 188 + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; 189 189 status = "okay"; 190 190 }; 191 191
+18
arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
··· 186 186 status = "okay"; 187 187 }; 188 188 189 + &uart1 { 190 + pinctrl-names = "default"; 191 + pinctrl-0 = <&uart1_pins>; 192 + status = "disabled"; 193 + }; 194 + 195 + &uart2 { 196 + pinctrl-names = "default"; 197 + pinctrl-0 = <&uart2_pins>; 198 + status = "disabled"; 199 + }; 200 + 201 + &uart3 { 202 + pinctrl-names = "default"; 203 + pinctrl-0 = <&uart3_pins>; 204 + status = "disabled"; 205 + }; 206 + 189 207 &usb1_vbus_pin_a { 190 208 allwinner,pins = "PG13"; 191 209 };
+18
arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
··· 139 139 status = "okay"; 140 140 }; 141 141 142 + &uart1 { 143 + pinctrl-names = "default"; 144 + pinctrl-0 = <&uart1_pins>; 145 + status = "disabled"; 146 + }; 147 + 148 + &uart2 { 149 + pinctrl-names = "default"; 150 + pinctrl-0 = <&uart2_pins>; 151 + status = "disabled"; 152 + }; 153 + 154 + &uart3 { 155 + pinctrl-names = "default"; 156 + pinctrl-0 = <&uart3_pins>; 157 + status = "disabled"; 158 + }; 159 + 142 160 &usbphy { 143 161 /* USB VBUS is always on */ 144 162 status = "okay";
+18
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
··· 161 161 status = "okay"; 162 162 }; 163 163 164 + &uart1 { 165 + pinctrl-names = "default"; 166 + pinctrl-0 = <&uart1_pins>; 167 + status = "disabled"; 168 + }; 169 + 170 + &uart2 { 171 + pinctrl-names = "default"; 172 + pinctrl-0 = <&uart2_pins>; 173 + status = "disabled"; 174 + }; 175 + 176 + &uart3 { 177 + pinctrl-names = "default"; 178 + pinctrl-0 = <&uart3_pins>; 179 + status = "disabled"; 180 + }; 181 + 164 182 &usbphy { 165 183 /* USB VBUS is always on */ 166 184 status = "okay";
+83 -2
arch/arm/boot/dts/sun8i-h3.dtsi
··· 327 327 interrupt-controller; 328 328 #interrupt-cells = <3>; 329 329 330 + i2c0_pins: i2c0 { 331 + allwinner,pins = "PA11", "PA12"; 332 + allwinner,function = "i2c0"; 333 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 334 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 335 + }; 336 + 337 + i2c1_pins: i2c1 { 338 + allwinner,pins = "PA18", "PA19"; 339 + allwinner,function = "i2c1"; 340 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 341 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 342 + }; 343 + 344 + i2c2_pins: i2c2 { 345 + allwinner,pins = "PE12", "PE13"; 346 + allwinner,function = "i2c2"; 347 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 348 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 349 + }; 350 + 330 351 mmc0_pins_a: mmc0@0 { 331 352 allwinner,pins = "PF0", "PF1", "PF2", "PF3", 332 353 "PF4", "PF5"; ··· 388 367 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 389 368 }; 390 369 391 - uart1_pins_a: uart1@0 { 392 - allwinner,pins = "PG6", "PG7", "PG8", "PG9"; 370 + uart1_pins: uart1 { 371 + allwinner,pins = "PG6", "PG7"; 393 372 allwinner,function = "uart1"; 373 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 374 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 375 + }; 376 + 377 + uart1_rts_cts_pins: uart1_rts_cts { 378 + allwinner,pins = "PG8", "PG9"; 379 + allwinner,function = "uart1"; 380 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 381 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 382 + }; 383 + 384 + uart2_pins: uart2 { 385 + allwinner,pins = "PA0", "PA1"; 386 + allwinner,function = "uart2"; 387 + allwinner,drive = <SUN4I_PINCTRL_10_MA>; 388 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 389 + }; 390 + 391 + uart3_pins: uart3 { 392 + allwinner,pins = "PG13", "PG14"; 393 + allwinner,function = "uart3"; 394 394 allwinner,drive = <SUN4I_PINCTRL_10_MA>; 395 395 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 396 396 }; ··· 489 447 dmas = <&dma 9>, <&dma 9>; 490 448 dma-names = "rx", "tx"; 491 449 status = "disabled"; 450 + }; 451 + 452 + i2c0: i2c@01c2ac00 { 453 + compatible = "allwinner,sun6i-a31-i2c"; 454 + reg = <0x01c2ac00 0x400>; 455 + interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; 456 + clocks = <&ccu CLK_BUS_I2C0>; 457 + resets = <&ccu RST_BUS_I2C0>; 458 + pinctrl-names = "default"; 459 + pinctrl-0 = <&i2c0_pins>; 460 + status = "disabled"; 461 + #address-cells = <1>; 462 + #size-cells = <0>; 463 + }; 464 + 465 + i2c1: i2c@01c2b000 { 466 + compatible = "allwinner,sun6i-a31-i2c"; 467 + reg = <0x01c2b000 0x400>; 468 + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 469 + clocks = <&ccu CLK_BUS_I2C1>; 470 + resets = <&ccu RST_BUS_I2C1>; 471 + pinctrl-names = "default"; 472 + pinctrl-0 = <&i2c1_pins>; 473 + status = "disabled"; 474 + #address-cells = <1>; 475 + #size-cells = <0>; 476 + }; 477 + 478 + i2c2: i2c@01c2b400 { 479 + compatible = "allwinner,sun6i-a31-i2c"; 480 + reg = <0x01c2b000 0x400>; 481 + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; 482 + clocks = <&ccu CLK_BUS_I2C2>; 483 + resets = <&ccu RST_BUS_I2C2>; 484 + pinctrl-names = "default"; 485 + pinctrl-0 = <&i2c2_pins>; 486 + status = "disabled"; 487 + #address-cells = <1>; 488 + #size-cells = <0>; 492 489 }; 493 490 494 491 gic: interrupt-controller@01c81000 {
+116
arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
··· 253 253 reg_rtc_ldo: rtc_ldo { 254 254 regulator-name = "vcc-rtc-vdd1v8-io"; 255 255 }; 256 + 257 + sw { 258 + /* unused */ 259 + }; 260 + }; 261 + }; 262 + 263 + axp806: pmic@745 { 264 + compatible = "x-powers,axp806"; 265 + reg = <0x745>; 266 + interrupt-parent = <&nmi_intc>; 267 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 268 + interrupt-controller; 269 + #interrupt-cells = <1>; 270 + bldoin-supply = <&reg_dcdce>; 271 + 272 + regulators { 273 + reg_s_aldo1: aldo1 { 274 + regulator-always-on; 275 + regulator-min-microvolt = <3000000>; 276 + regulator-max-microvolt = <3000000>; 277 + regulator-name = "avcc"; 278 + }; 279 + 280 + aldo2 { 281 + /* 282 + * unused, but use a different name to 283 + * avoid name clash with axp809's aldo's 284 + */ 285 + regulator-name = "s_aldo2"; 286 + }; 287 + 288 + aldo3 { 289 + /* 290 + * unused, but use a different name to 291 + * avoid name clash with axp809's aldo's 292 + */ 293 + regulator-name = "s_aldo3"; 294 + }; 295 + 296 + reg_bldo1: bldo1 { 297 + regulator-always-on; 298 + regulator-min-microvolt = <1700000>; 299 + regulator-max-microvolt = <1900000>; 300 + regulator-name = "vcc18-efuse-adc-display-csi"; 301 + }; 302 + 303 + reg_bldo2: bldo2 { 304 + regulator-always-on; 305 + regulator-min-microvolt = <1700000>; 306 + regulator-max-microvolt = <1900000>; 307 + regulator-name = 308 + "vdd18-drampll-vcc18-pll-cpvdd"; 309 + }; 310 + 311 + bldo3 { 312 + /* unused */ 313 + }; 314 + 315 + reg_bldo4: bldo4 { 316 + regulator-min-microvolt = <1100000>; 317 + regulator-max-microvolt = <1300000>; 318 + regulator-name = "vcc12-hsic"; 319 + }; 320 + 321 + reg_cldo1: cldo1 { 322 + /* 323 + * This was 3V in the original design, but 324 + * 3.3V is the recommended supply voltage 325 + * for the Ethernet PHY. 326 + */ 327 + regulator-min-microvolt = <3300000>; 328 + regulator-max-microvolt = <3300000>; 329 + regulator-name = "vcc-gmac-phy"; 330 + }; 331 + 332 + reg_cldo2: cldo2 { 333 + regulator-min-microvolt = <2800000>; 334 + regulator-max-microvolt = <2800000>; 335 + regulator-name = "afvcc-cam"; 336 + }; 337 + 338 + reg_cldo3: cldo3 { 339 + regulator-min-microvolt = <3000000>; 340 + regulator-max-microvolt = <3000000>; 341 + regulator-name = "vcc-io-wifi-codec-io2"; 342 + }; 343 + 344 + reg_dcdca: dcdca { 345 + regulator-always-on; 346 + regulator-min-microvolt = <800000>; 347 + regulator-max-microvolt = <1100000>; 348 + regulator-name = "vdd-cpub"; 349 + }; 350 + 351 + reg_dcdcd: dcdcd { 352 + regulator-always-on; 353 + regulator-min-microvolt = <800000>; 354 + regulator-max-microvolt = <1100000>; 355 + regulator-name = "vdd-vpu"; 356 + }; 357 + 358 + reg_dcdce: dcdce { 359 + regulator-always-on; 360 + regulator-min-microvolt = <2100000>; 361 + regulator-max-microvolt = <2100000>; 362 + regulator-name = "vcc-bldo-codec-ldoin"; 363 + }; 364 + 365 + sw { 366 + /* 367 + * unused, but use a different name to 368 + * avoid name clash with axp809's sw 369 + */ 370 + regulator-name = "s_sw"; 371 + }; 256 372 }; 257 373 }; 258 374
+121 -2
arch/arm/boot/dts/sun9i-a80-optimus.dts
··· 112 112 }; 113 113 114 114 &ehci1 { 115 - status = "okay"; 115 + /* Enable if HSIC peripheral is connected */ 116 + status = "disabled"; 116 117 }; 117 118 118 119 &ehci2 { ··· 326 325 reg_rtc_ldo: rtc_ldo { 327 326 regulator-name = "vcc-rtc-vdd1v8-io"; 328 327 }; 328 + 329 + sw { 330 + /* unused */ 331 + }; 332 + }; 333 + }; 334 + 335 + axp806: pmic@745 { 336 + compatible = "x-powers,axp806"; 337 + reg = <0x745>; 338 + interrupt-parent = <&nmi_intc>; 339 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 340 + interrupt-controller; 341 + #interrupt-cells = <1>; 342 + bldoin-supply = <&reg_dcdce>; 343 + 344 + regulators { 345 + reg_s_aldo1: aldo1 { 346 + regulator-always-on; 347 + regulator-min-microvolt = <3000000>; 348 + regulator-max-microvolt = <3000000>; 349 + regulator-name = "avcc"; 350 + }; 351 + 352 + aldo2 { 353 + /* 354 + * unused, but use a different name to 355 + * avoid name clash with axp809's aldo's 356 + */ 357 + regulator-name = "s_aldo2"; 358 + }; 359 + 360 + aldo3 { 361 + /* 362 + * unused, but use a different name to 363 + * avoid name clash with axp809's aldo's 364 + */ 365 + regulator-name = "s_aldo3"; 366 + }; 367 + 368 + reg_bldo1: bldo1 { 369 + regulator-always-on; 370 + regulator-min-microvolt = <1700000>; 371 + regulator-max-microvolt = <1900000>; 372 + regulator-name = "vcc18-efuse-adc-display-csi"; 373 + }; 374 + 375 + reg_bldo2: bldo2 { 376 + regulator-always-on; 377 + regulator-min-microvolt = <1700000>; 378 + regulator-max-microvolt = <1900000>; 379 + regulator-name = 380 + "vdd18-drampll-vcc18-pll-cpvdd"; 381 + }; 382 + 383 + bldo3 { 384 + /* unused */ 385 + }; 386 + 387 + reg_bldo4: bldo4 { 388 + regulator-min-microvolt = <1100000>; 389 + regulator-max-microvolt = <1300000>; 390 + regulator-name = "vcc12-hsic"; 391 + }; 392 + 393 + reg_cldo1: cldo1 { 394 + /* 395 + * This was 3V in the original design, but 396 + * 3.3V is the recommended supply voltage 397 + * for the Ethernet PHY. 398 + */ 399 + regulator-min-microvolt = <3300000>; 400 + regulator-max-microvolt = <3300000>; 401 + regulator-name = "vcc-gmac-phy"; 402 + }; 403 + 404 + reg_cldo2: cldo2 { 405 + regulator-min-microvolt = <2800000>; 406 + regulator-max-microvolt = <2800000>; 407 + regulator-name = "afvcc-cam"; 408 + }; 409 + 410 + reg_cldo3: cldo3 { 411 + regulator-min-microvolt = <3000000>; 412 + regulator-max-microvolt = <3000000>; 413 + regulator-name = "vcc-io-wifi-codec-io2"; 414 + }; 415 + 416 + reg_dcdca: dcdca { 417 + regulator-always-on; 418 + regulator-min-microvolt = <800000>; 419 + regulator-max-microvolt = <1100000>; 420 + regulator-name = "vdd-cpub"; 421 + }; 422 + 423 + reg_dcdcd: dcdcd { 424 + regulator-always-on; 425 + regulator-min-microvolt = <800000>; 426 + regulator-max-microvolt = <1100000>; 427 + regulator-name = "vdd-vpu"; 428 + }; 429 + 430 + reg_dcdce: dcdce { 431 + regulator-always-on; 432 + regulator-min-microvolt = <2100000>; 433 + regulator-max-microvolt = <2100000>; 434 + regulator-name = "vcc-bldo-codec-ldoin"; 435 + }; 436 + 437 + sw { 438 + /* 439 + * unused, but use a different name to 440 + * avoid name clash with axp809's sw 441 + */ 442 + regulator-name = "s_sw"; 443 + }; 329 444 }; 330 445 }; 331 446 ··· 484 367 }; 485 368 486 369 &usbphy2 { 487 - status = "okay"; 370 + phy-supply = <&reg_bldo4>; 371 + /* Enable if HSIC peripheral is connected */ 372 + status = "disabled"; 488 373 }; 489 374 490 375 &usbphy3 {
-36
arch/arm/mach-integrator/integrator_ap.c
··· 17 17 * along with this program; if not, write to the Free Software 18 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 - #include <linux/types.h> 21 20 #include <linux/kernel.h> 22 21 #include <linux/init.h> 23 - #include <linux/list.h> 24 - #include <linux/platform_device.h> 25 - #include <linux/slab.h> 26 - #include <linux/string.h> 27 22 #include <linux/syscore_ops.h> 28 23 #include <linux/amba/bus.h> 29 - #include <linux/amba/kmi.h> 30 24 #include <linux/io.h> 31 25 #include <linux/irqchip.h> 32 - #include <linux/platform_data/clk-integrator.h> 33 26 #include <linux/of_irq.h> 34 27 #include <linux/of_address.h> 35 28 #include <linux/of_platform.h> 36 - #include <linux/stat.h> 37 29 #include <linux/termios.h> 38 30 39 - #include <asm/setup.h> 40 - #include <asm/param.h> /* HZ */ 41 - #include <asm/mach-types.h> 42 - 43 31 #include <asm/mach/arch.h> 44 - #include <asm/mach/irq.h> 45 32 #include <asm/mach/map.h> 46 - #include <asm/mach/time.h> 47 33 48 34 #include "hardware.h" 49 35 #include "cm.h" ··· 54 68 55 69 /* 56 70 * Logical Physical 57 - * ef000000 Cache flush 58 - * f1100000 11000000 System controller registers 59 - * f1300000 13000000 Counter/Timer 60 71 * f1400000 14000000 Interrupt controller 61 72 * f1600000 16000000 UART 0 62 - * f1700000 17000000 UART 1 63 - * f1a00000 1a000000 Debug LEDs 64 - * f1b00000 1b000000 GPIO 65 73 */ 66 74 67 75 static struct map_desc ap_io_desc[] __initdata __maybe_unused = { ··· 67 87 }, { 68 88 .virtual = IO_ADDRESS(INTEGRATOR_UART0_BASE), 69 89 .pfn = __phys_to_pfn(INTEGRATOR_UART0_BASE), 70 - .length = SZ_4K, 71 - .type = MT_DEVICE 72 - }, { 73 - .virtual = IO_ADDRESS(INTEGRATOR_DBG_BASE), 74 - .pfn = __phys_to_pfn(INTEGRATOR_DBG_BASE), 75 - .length = SZ_4K, 76 - .type = MT_DEVICE 77 - }, { 78 - .virtual = IO_ADDRESS(INTEGRATOR_AP_GPIO_BASE), 79 - .pfn = __phys_to_pfn(INTEGRATOR_AP_GPIO_BASE), 80 90 .length = SZ_4K, 81 91 .type = MT_DEVICE 82 92 } ··· 166 196 167 197 /* For the Device Tree, add in the UART callbacks as AUXDATA */ 168 198 static struct of_dev_auxdata ap_auxdata_lookup[] __initdata = { 169 - OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_RTC_BASE, 170 - "rtc", NULL), 171 199 OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART0_BASE, 172 200 "uart0", &ap_uart_data), 173 201 OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART1_BASE, 174 202 "uart1", &ap_uart_data), 175 - OF_DEV_AUXDATA("arm,primecell", KMI0_BASE, 176 - "kmi0", NULL), 177 - OF_DEV_AUXDATA("arm,primecell", KMI1_BASE, 178 - "kmi1", NULL), 179 203 { /* sentinel */ }, 180 204 }; 181 205
+13 -110
arch/arm/mach-integrator/integrator_cp.c
··· 7 7 * it under the terms of the GNU General Public License as published by 8 8 * the Free Software Foundation; either version 2 of the License. 9 9 */ 10 - #include <linux/types.h> 11 10 #include <linux/kernel.h> 12 - #include <linux/init.h> 13 - #include <linux/list.h> 14 - #include <linux/platform_device.h> 15 - #include <linux/dma-mapping.h> 16 - #include <linux/string.h> 17 - #include <linux/device.h> 18 - #include <linux/amba/bus.h> 19 - #include <linux/amba/kmi.h> 20 - #include <linux/amba/clcd.h> 21 - #include <linux/platform_data/video-clcd-versatile.h> 22 11 #include <linux/amba/mmci.h> 23 12 #include <linux/io.h> 24 13 #include <linux/irqchip.h> 25 - #include <linux/gfp.h> 26 14 #include <linux/of_irq.h> 27 15 #include <linux/of_address.h> 28 16 #include <linux/of_platform.h> 29 17 #include <linux/sched_clock.h> 18 + #include <linux/regmap.h> 19 + #include <linux/mfd/syscon.h> 30 20 31 - #include <asm/setup.h> 32 - #include <asm/mach-types.h> 33 21 #include <asm/mach/arch.h> 34 - #include <asm/mach/irq.h> 35 22 #include <asm/mach/map.h> 36 - #include <asm/mach/time.h> 37 23 38 24 #include "hardware.h" 39 25 #include "cm.h" 40 26 #include "common.h" 41 27 28 + /* Base address to the core module header */ 29 + static struct regmap *cm_map; 42 30 /* Base address to the CP controller */ 43 31 static void __iomem *intcp_con_base; 44 32 45 - #define INTCP_PA_CLCD_BASE 0xc0000000 33 + #define CM_COUNTER_OFFSET 0x28 46 34 47 35 /* 48 36 * Logical Physical 49 - * f1000000 10000000 Core module registers 50 - * f1300000 13000000 Counter/Timer 51 37 * f1400000 14000000 Interrupt controller 52 38 * f1600000 16000000 UART 0 53 - * f1700000 17000000 UART 1 54 - * f1a00000 1a000000 Debug LEDs 55 - * fc900000 c9000000 GPIO 56 39 * fca00000 ca000000 SIC 57 40 */ 58 41 59 42 static struct map_desc intcp_io_desc[] __initdata __maybe_unused = { 60 43 { 61 - .virtual = IO_ADDRESS(INTEGRATOR_HDR_BASE), 62 - .pfn = __phys_to_pfn(INTEGRATOR_HDR_BASE), 63 - .length = SZ_4K, 64 - .type = MT_DEVICE 65 - }, { 66 - .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), 67 - .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), 68 - .length = SZ_4K, 69 - .type = MT_DEVICE 70 - }, { 71 44 .virtual = IO_ADDRESS(INTEGRATOR_IC_BASE), 72 45 .pfn = __phys_to_pfn(INTEGRATOR_IC_BASE), 73 46 .length = SZ_4K, ··· 48 75 }, { 49 76 .virtual = IO_ADDRESS(INTEGRATOR_UART0_BASE), 50 77 .pfn = __phys_to_pfn(INTEGRATOR_UART0_BASE), 51 - .length = SZ_4K, 52 - .type = MT_DEVICE 53 - }, { 54 - .virtual = IO_ADDRESS(INTEGRATOR_DBG_BASE), 55 - .pfn = __phys_to_pfn(INTEGRATOR_DBG_BASE), 56 - .length = SZ_4K, 57 - .type = MT_DEVICE 58 - }, { 59 - .virtual = IO_ADDRESS(INTEGRATOR_CP_GPIO_BASE), 60 - .pfn = __phys_to_pfn(INTEGRATOR_CP_GPIO_BASE), 61 78 .length = SZ_4K, 62 79 .type = MT_DEVICE 63 80 }, { ··· 84 121 .gpio_cd = -1, 85 122 }; 86 123 87 - /* 88 - * CLCD support 89 - */ 90 - /* 91 - * Ensure VGA is selected. 92 - */ 93 - static void cp_clcd_enable(struct clcd_fb *fb) 94 - { 95 - struct fb_var_screeninfo *var = &fb->fb.var; 96 - u32 val = CM_CTRL_STATIC1 | CM_CTRL_STATIC2 97 - | CM_CTRL_LCDEN0 | CM_CTRL_LCDEN1; 98 - 99 - if (var->bits_per_pixel <= 8 || 100 - (var->bits_per_pixel == 16 && var->green.length == 5)) 101 - /* Pseudocolor, RGB555, BGR555 */ 102 - val |= CM_CTRL_LCDMUXSEL_VGA555_TFT555; 103 - else if (fb->fb.var.bits_per_pixel <= 16) 104 - /* truecolor RGB565 */ 105 - val |= CM_CTRL_LCDMUXSEL_VGA565_TFT555; 106 - else 107 - val = 0; /* no idea for this, don't trust the docs */ 108 - 109 - cm_control(CM_CTRL_LCDMUXSEL_MASK| 110 - CM_CTRL_LCDEN0| 111 - CM_CTRL_LCDEN1| 112 - CM_CTRL_STATIC1| 113 - CM_CTRL_STATIC2| 114 - CM_CTRL_STATIC| 115 - CM_CTRL_n24BITEN, val); 116 - } 117 - 118 - static int cp_clcd_setup(struct clcd_fb *fb) 119 - { 120 - fb->panel = versatile_clcd_get_panel("VGA"); 121 - if (!fb->panel) 122 - return -EINVAL; 123 - 124 - return versatile_clcd_setup_dma(fb, SZ_1M); 125 - } 126 - 127 - static struct clcd_board clcd_data = { 128 - .name = "Integrator/CP", 129 - .caps = CLCD_CAP_5551 | CLCD_CAP_RGB565 | CLCD_CAP_888, 130 - .check = clcdfb_check, 131 - .decode = clcdfb_decode, 132 - .enable = cp_clcd_enable, 133 - .setup = cp_clcd_setup, 134 - .mmap = versatile_clcd_mmap_dma, 135 - .remove = versatile_clcd_remove_dma, 136 - }; 137 - 138 - #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) 139 - 140 124 static u64 notrace intcp_read_sched_clock(void) 141 125 { 142 - return readl(REFCOUNTER); 126 + unsigned int val; 127 + 128 + /* MMIO so discard return code */ 129 + regmap_read(cm_map, CM_COUNTER_OFFSET, &val); 130 + return val; 143 131 } 144 132 145 133 static void __init intcp_init_early(void) 146 134 { 135 + cm_map = syscon_regmap_lookup_by_compatible("arm,core-module-integrator"); 136 + if (IS_ERR(cm_map)) 137 + return; 147 138 sched_clock_register(intcp_read_sched_clock, 32, 24000000); 148 139 } 149 140 ··· 112 195 * and enforce the bus names since these are used for clock lookups. 113 196 */ 114 197 static struct of_dev_auxdata intcp_auxdata_lookup[] __initdata = { 115 - OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_RTC_BASE, 116 - "rtc", NULL), 117 - OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART0_BASE, 118 - "uart0", NULL), 119 - OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART1_BASE, 120 - "uart1", NULL), 121 - OF_DEV_AUXDATA("arm,primecell", KMI0_BASE, 122 - "kmi0", NULL), 123 - OF_DEV_AUXDATA("arm,primecell", KMI1_BASE, 124 - "kmi1", NULL), 125 198 OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_CP_MMC_BASE, 126 199 "mmci", &mmc_data), 127 - OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_CP_AACI_BASE, 128 - "aaci", &mmc_data), 129 - OF_DEV_AUXDATA("arm,primecell", INTCP_PA_CLCD_BASE, 130 - "clcd", &clcd_data), 131 200 { /* sentinel */ }, 132 201 }; 133 202
+11
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
··· 87 87 pinctrl-names = "default"; 88 88 }; 89 89 90 + &ir { 91 + status = "okay"; 92 + pinctrl-0 = <&remote_input_ao_pins>; 93 + pinctrl-names = "default"; 94 + }; 95 + 96 + &i2c_A { 97 + status = "okay"; 98 + pinctrl-0 = <&i2c_a_pins>; 99 + pinctrl-names = "default"; 100 + };
+6
arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts
··· 50 50 compatible = "amlogic,p200", "amlogic,meson-gxbb"; 51 51 model = "Amlogic Meson GXBB P200 Development Board"; 52 52 }; 53 + 54 + &i2c_B { 55 + status = "okay"; 56 + pinctrl-0 = <&i2c_b_pins>; 57 + pinctrl-names = "default"; 58 + };
+35
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
··· 57 57 device_type = "memory"; 58 58 reg = <0x0 0x0 0x0 0x40000000>; 59 59 }; 60 + 61 + usb_pwr: regulator-usb-pwrs { 62 + compatible = "regulator-fixed"; 63 + 64 + regulator-name = "USB_PWR"; 65 + 66 + regulator-min-microvolt = <5000000>; 67 + regulator-max-microvolt = <5000000>; 68 + 69 + /* signal name in schematic: USB_PWR_EN */ 70 + gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; 71 + enable-active-high; 72 + }; 60 73 }; 61 74 62 75 /* This UART is brought out to the DB9 connector */ ··· 85 72 pinctrl-names = "default"; 86 73 }; 87 74 75 + &ir { 76 + status = "okay"; 77 + pinctrl-0 = <&remote_input_ao_pins>; 78 + pinctrl-names = "default"; 79 + }; 80 + 81 + &usb0_phy { 82 + status = "okay"; 83 + phy-supply = <&usb_pwr>; 84 + }; 85 + 86 + &usb1_phy { 87 + status = "okay"; 88 + }; 89 + 90 + &usb0 { 91 + status = "okay"; 92 + }; 93 + 94 + &usb1 { 95 + status = "okay"; 96 + };
+42
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
··· 52 52 chosen { 53 53 stdout-path = "serial0:115200n8"; 54 54 }; 55 + 56 + usb_vbus: regulator-usb0-vbus { 57 + compatible = "regulator-fixed"; 58 + 59 + regulator-name = "USB0_VBUS"; 60 + 61 + regulator-min-microvolt = <5000000>; 62 + regulator-max-microvolt = <5000000>; 63 + 64 + gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; 65 + enable-active-high; 66 + }; 67 + 55 68 }; 56 69 57 70 &uart_AO { ··· 72 59 pinctrl-0 = <&uart_ao_a_pins>; 73 60 pinctrl-names = "default"; 74 61 62 + }; 63 + 64 + &ir { 65 + status = "okay"; 66 + pinctrl-0 = <&remote_input_ao_pins>; 67 + pinctrl-names = "default"; 68 + }; 69 + 70 + &ethmac { 71 + status = "okay"; 72 + pinctrl-0 = <&eth_pins>; 73 + pinctrl-names = "default"; 74 + }; 75 + 76 + &usb0_phy { 77 + status = "okay"; 78 + phy-supply = <&usb_vbus>; 79 + }; 80 + 81 + &usb1_phy { 82 + status = "okay"; 83 + }; 84 + 85 + &usb0 { 86 + status = "okay"; 87 + }; 88 + 89 + &usb1 { 90 + status = "okay"; 75 91 };
+326 -3
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
··· 45 45 #include <dt-bindings/interrupt-controller/arm-gic.h> 46 46 #include <dt-bindings/gpio/meson-gxbb-gpio.h> 47 47 #include <dt-bindings/reset/amlogic,meson-gxbb-reset.h> 48 + #include <dt-bindings/clock/gxbb-clkc.h> 49 + #include <dt-bindings/clock/gxbb-aoclkc.h> 50 + #include <dt-bindings/reset/gxbb-aoclkc.h> 48 51 49 52 / { 50 53 compatible = "amlogic,meson-gxbb"; ··· 102 99 method = "smc"; 103 100 }; 104 101 102 + firmware { 103 + sm: secure-monitor { 104 + compatible = "amlogic,meson-gxbb-sm"; 105 + }; 106 + }; 107 + 108 + efuse: efuse { 109 + compatible = "amlogic,meson-gxbb-efuse"; 110 + #address-cells = <1>; 111 + #size-cells = <1>; 112 + 113 + sn: sn@14 { 114 + reg = <0x14 0x10>; 115 + }; 116 + 117 + eth_mac: eth_mac@34 { 118 + reg = <0x34 0x10>; 119 + }; 120 + 121 + bid: bid@46 { 122 + reg = <0x46 0x30>; 123 + }; 124 + }; 125 + 105 126 timer { 106 127 compatible = "arm,armv8-timer"; 107 128 interrupts = <GIC_PPI 13 ··· 150 123 #address-cells = <2>; 151 124 #size-cells = <2>; 152 125 ranges; 126 + 127 + usb0_phy: phy@c0000000 { 128 + compatible = "amlogic,meson-gxbb-usb2-phy"; 129 + #phy-cells = <0>; 130 + reg = <0x0 0xc0000000 0x0 0x20>; 131 + resets = <&reset RESET_USB_OTG>; 132 + clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>; 133 + clock-names = "usb_general", "usb"; 134 + status = "disabled"; 135 + }; 136 + 137 + usb1_phy: phy@c0000020 { 138 + compatible = "amlogic,meson-gxbb-usb2-phy"; 139 + #phy-cells = <0>; 140 + reg = <0x0 0xc0000020 0x0 0x20>; 141 + clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>; 142 + clock-names = "usb_general", "usb"; 143 + status = "disabled"; 144 + }; 153 145 154 146 cbus: cbus@c1100000 { 155 147 compatible = "simple-bus"; ··· 199 153 status = "disabled"; 200 154 }; 201 155 156 + pwm_ab: pwm@8550 { 157 + compatible = "amlogic,meson-gxbb-pwm"; 158 + reg = <0x0 0x08550 0x0 0x10>; 159 + #pwm-cells = <3>; 160 + status = "disabled"; 161 + }; 162 + 163 + pwm_cd: pwm@8650 { 164 + compatible = "amlogic,meson-gxbb-pwm"; 165 + reg = <0x0 0x08650 0x0 0x10>; 166 + #pwm-cells = <3>; 167 + status = "disabled"; 168 + }; 169 + 170 + pwm_ef: pwm@86c0 { 171 + compatible = "amlogic,meson-gxbb-pwm"; 172 + reg = <0x0 0x086c0 0x0 0x10>; 173 + #pwm-cells = <3>; 174 + status = "disabled"; 175 + }; 176 + 202 177 uart_C: serial@8700 { 203 178 compatible = "amlogic,meson-uart"; 204 179 reg = <0x0 0x8700 0x0 0x14>; 205 180 interrupts = <GIC_SPI 93 IRQ_TYPE_EDGE_RISING>; 206 181 clocks = <&xtal>; 182 + status = "disabled"; 183 + }; 184 + 185 + watchdog@98d0 { 186 + compatible = "amlogic,meson-gxbb-wdt"; 187 + reg = <0x0 0x098d0 0x0 0x10>; 188 + clocks = <&xtal>; 189 + }; 190 + 191 + spifc: spi@8c80 { 192 + compatible = "amlogic,meson-gxbb-spifc"; 193 + reg = <0x0 0x08c80 0x0 0x80>; 194 + #address-cells = <1>; 195 + #size-cells = <0>; 196 + clocks = <&clkc CLKID_SPI>; 197 + status = "disabled"; 198 + }; 199 + 200 + i2c_A: i2c@8500 { 201 + compatible = "amlogic,meson-gxbb-i2c"; 202 + reg = <0x0 0x08500 0x0 0x20>; 203 + interrupts = <GIC_SPI 21 IRQ_TYPE_EDGE_RISING>; 204 + clocks = <&clkc CLKID_I2C>; 205 + #address-cells = <1>; 206 + #size-cells = <0>; 207 + status = "disabled"; 208 + }; 209 + 210 + i2c_B: i2c@87c0 { 211 + compatible = "amlogic,meson-gxbb-i2c"; 212 + reg = <0x0 0x087c0 0x0 0x20>; 213 + interrupts = <GIC_SPI 214 IRQ_TYPE_EDGE_RISING>; 214 + clocks = <&clkc CLKID_I2C>; 215 + #address-cells = <1>; 216 + #size-cells = <0>; 217 + status = "disabled"; 218 + }; 219 + 220 + i2c_C: i2c@87e0 { 221 + compatible = "amlogic,meson-gxbb-i2c"; 222 + reg = <0x0 0x087e0 0x0 0x20>; 223 + interrupts = <GIC_SPI 215 IRQ_TYPE_EDGE_RISING>; 224 + clocks = <&clkc CLKID_I2C>; 225 + #address-cells = <1>; 226 + #size-cells = <0>; 207 227 status = "disabled"; 208 228 }; 209 229 }; ··· 315 203 function = "uart_ao"; 316 204 }; 317 205 }; 206 + 207 + remote_input_ao_pins: remote_input_ao { 208 + mux { 209 + groups = "remote_input_ao"; 210 + function = "remote_input_ao"; 211 + }; 212 + }; 213 + 214 + i2c_ao_pins: i2c_ao { 215 + mux { 216 + groups = "i2c_sck_ao", 217 + "i2c_sda_ao"; 218 + function = "i2c_ao"; 219 + }; 220 + }; 221 + 222 + pwm_ao_a_3_pins: pwm_ao_a_3 { 223 + mux { 224 + groups = "pwm_ao_a_3"; 225 + function = "pwm_ao_a_3"; 226 + }; 227 + }; 228 + 229 + pwm_ao_a_6_pins: pwm_ao_a_6 { 230 + mux { 231 + groups = "pwm_ao_a_6"; 232 + function = "pwm_ao_a_6"; 233 + }; 234 + }; 235 + 236 + pwm_ao_a_12_pins: pwm_ao_a_12 { 237 + mux { 238 + groups = "pwm_ao_a_12"; 239 + function = "pwm_ao_a_12"; 240 + }; 241 + }; 242 + 243 + pwm_ao_b_pins: pwm_ao_b { 244 + mux { 245 + groups = "pwm_ao_b"; 246 + function = "pwm_ao_b"; 247 + }; 248 + }; 249 + }; 250 + 251 + clkc_AO: clock-controller@040 { 252 + compatible = "amlogic,gxbb-aoclkc"; 253 + reg = <0x0 0x00040 0x0 0x4>; 254 + #clock-cells = <1>; 255 + #reset-cells = <1>; 318 256 }; 319 257 320 258 uart_AO: serial@4c0 { ··· 372 210 reg = <0x0 0x004c0 0x0 0x14>; 373 211 interrupts = <GIC_SPI 193 IRQ_TYPE_EDGE_RISING>; 374 212 clocks = <&xtal>; 213 + status = "disabled"; 214 + }; 215 + 216 + ir: ir@580 { 217 + compatible = "amlogic,meson-gxbb-ir"; 218 + reg = <0x0 0x00580 0x0 0x40>; 219 + interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>; 220 + status = "disabled"; 221 + }; 222 + 223 + pwm_ab_AO: pwm@550 { 224 + compatible = "amlogic,meson-gxbb-pwm"; 225 + reg = <0x0 0x0550 0x0 0x10>; 226 + #pwm-cells = <3>; 227 + status = "disabled"; 228 + }; 229 + 230 + i2c_AO: i2c@500 { 231 + compatible = "amlogic,meson-gxbb-i2c"; 232 + reg = <0x0 0x500 0x0 0x20>; 233 + interrupts = <GIC_SPI 195 IRQ_TYPE_EDGE_RISING>; 234 + clocks = <&clkc CLKID_AO_I2C>; 235 + #address-cells = <1>; 236 + #size-cells = <0>; 375 237 status = "disabled"; 376 238 }; 377 239 }; ··· 437 251 }; 438 252 }; 439 253 254 + nor_pins: nor { 255 + mux { 256 + groups = "nor_d", 257 + "nor_q", 258 + "nor_c", 259 + "nor_cs"; 260 + function = "nor"; 261 + }; 262 + }; 263 + 440 264 sdcard_pins: sdcard { 441 265 mux { 442 266 groups = "sdcard_d0", ··· 456 260 "sdcard_cmd", 457 261 "sdcard_clk"; 458 262 function = "sdcard"; 263 + }; 264 + }; 265 + 266 + sdio_pins: sdio { 267 + mux { 268 + groups = "sdio_d0", 269 + "sdio_d1", 270 + "sdio_d2", 271 + "sdio_d3", 272 + "sdio_cmd", 273 + "sdio_clk"; 274 + function = "sdio"; 275 + }; 276 + }; 277 + 278 + sdio_irq_pins: sdio_irq { 279 + mux { 280 + groups = "sdio_irq"; 281 + function = "sdio"; 459 282 }; 460 283 }; 461 284 ··· 502 287 }; 503 288 }; 504 289 290 + i2c_a_pins: i2c_a { 291 + mux { 292 + groups = "i2c_sck_a", 293 + "i2c_sda_a"; 294 + function = "i2c_a"; 295 + }; 296 + }; 297 + 298 + i2c_b_pins: i2c_b { 299 + mux { 300 + groups = "i2c_sck_b", 301 + "i2c_sda_b"; 302 + function = "i2c_b"; 303 + }; 304 + }; 305 + 306 + i2c_c_pins: i2c_c { 307 + mux { 308 + groups = "i2c_sck_c", 309 + "i2c_sda_c"; 310 + function = "i2c_c"; 311 + }; 312 + }; 313 + 505 314 eth_pins: eth_c { 506 315 mux { 507 316 groups = "eth_mdio", ··· 545 306 function = "eth"; 546 307 }; 547 308 }; 309 + 310 + pwm_a_x_pins: pwm_a_x { 311 + mux { 312 + groups = "pwm_a_x"; 313 + function = "pwm_a_x"; 314 + }; 315 + }; 316 + 317 + pwm_a_y_pins: pwm_a_y { 318 + mux { 319 + groups = "pwm_a_y"; 320 + function = "pwm_a_y"; 321 + }; 322 + }; 323 + 324 + pwm_b_pins: pwm_b { 325 + mux { 326 + groups = "pwm_b"; 327 + function = "pwm_b"; 328 + }; 329 + }; 330 + 331 + pwm_d_pins: pwm_d { 332 + mux { 333 + groups = "pwm_d"; 334 + function = "pwm_d"; 335 + }; 336 + }; 337 + 338 + pwm_e_pins: pwm_e { 339 + mux { 340 + groups = "pwm_e"; 341 + function = "pwm_e"; 342 + }; 343 + }; 344 + 345 + pwm_f_x_pins: pwm_f_x { 346 + mux { 347 + groups = "pwm_f_x"; 348 + function = "pwm_f_x"; 349 + }; 350 + }; 351 + 352 + pwm_f_y_pins: pwm_f_y { 353 + mux { 354 + groups = "pwm_f_y"; 355 + function = "pwm_f_y"; 356 + }; 357 + }; 548 358 }; 549 359 }; 550 360 ··· 609 321 #clock-cells = <1>; 610 322 reg = <0x0 0x0 0x0 0x3db>; 611 323 }; 324 + 325 + mailbox: mailbox@404 { 326 + compatible = "amlogic,meson-gxbb-mhu"; 327 + reg = <0 0x404 0 0x4c>; 328 + interrupts = <0 208 IRQ_TYPE_EDGE_RISING>, 329 + <0 209 IRQ_TYPE_EDGE_RISING>, 330 + <0 210 IRQ_TYPE_EDGE_RISING>; 331 + #mbox-cells = <1>; 332 + }; 612 333 }; 613 334 614 335 apb: apb@d0000000 { ··· 628 331 ranges = <0x0 0x0 0x0 0xd0000000 0x0 0x200000>; 629 332 }; 630 333 334 + usb0: usb@c9000000 { 335 + compatible = "amlogic,meson-gxbb-usb", "snps,dwc2"; 336 + reg = <0x0 0xc9000000 0x0 0x40000>; 337 + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; 338 + clocks = <&clkc CLKID_USB0_DDR_BRIDGE>; 339 + clock-names = "otg"; 340 + phys = <&usb0_phy>; 341 + phy-names = "usb2-phy"; 342 + dr_mode = "host"; 343 + status = "disabled"; 344 + }; 345 + 346 + usb1: usb@c9100000 { 347 + compatible = "amlogic,meson-gxbb-usb", "snps,dwc2"; 348 + reg = <0x0 0xc9100000 0x0 0x40000>; 349 + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; 350 + clocks = <&clkc CLKID_USB1_DDR_BRIDGE>; 351 + clock-names = "otg"; 352 + phys = <&usb1_phy>; 353 + phy-names = "usb2-phy"; 354 + dr_mode = "host"; 355 + status = "disabled"; 356 + }; 357 + 631 358 ethmac: ethernet@c9410000 { 632 - compatible = "amlogic,meson6-dwmac", "snps,dwmac"; 359 + compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac"; 633 360 reg = <0x0 0xc9410000 0x0 0x10000 634 361 0x0 0xc8834540 0x0 0x4>; 635 362 interrupts = <0 8 1>; 636 363 interrupt-names = "macirq"; 637 - clocks = <&xtal>; 638 - clock-names = "stmmaceth"; 364 + clocks = <&clkc CLKID_ETH>, 365 + <&clkc CLKID_FCLK_DIV2>, 366 + <&clkc CLKID_MPLL2>; 367 + clock-names = "stmmaceth", "clkin0", "clkin1"; 639 368 phy-mode = "rgmii"; 640 369 status = "disabled"; 641 370 };
+1 -1
arch/arm64/boot/dts/renesas/Makefile
··· 1 - dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-x.dtb 1 + dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-x.dtb r8a7795-h3ulcb.dtb 2 2 dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-x.dtb 3 3 4 4 always := $(dtb-y)
+328
arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts
··· 1 + /* 2 + * Device Tree Source for the H3ULCB board 3 + * 4 + * Copyright (C) 2016 Renesas Electronics Corp. 5 + * Copyright (C) 2016 Cogent Embedded, Inc. 6 + * 7 + * This file is licensed under the terms of the GNU General Public License 8 + * version 2. This program is licensed "as is" without any warranty of any 9 + * kind, whether express or implied. 10 + */ 11 + 12 + /dts-v1/; 13 + #include "r8a7795.dtsi" 14 + #include <dt-bindings/gpio/gpio.h> 15 + #include <dt-bindings/input/input.h> 16 + 17 + / { 18 + model = "Renesas H3ULCB board based on r8a7795"; 19 + compatible = "renesas,h3ulcb", "renesas,r8a7795"; 20 + 21 + aliases { 22 + serial0 = &scif2; 23 + ethernet0 = &avb; 24 + }; 25 + 26 + chosen { 27 + stdout-path = "serial0:115200n8"; 28 + }; 29 + 30 + memory@48000000 { 31 + device_type = "memory"; 32 + /* first 128MB is reserved for secure area. */ 33 + reg = <0x0 0x48000000 0x0 0x38000000>; 34 + }; 35 + 36 + leds { 37 + compatible = "gpio-leds"; 38 + 39 + led5 { 40 + gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; 41 + }; 42 + led6 { 43 + gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>; 44 + }; 45 + }; 46 + 47 + keyboard { 48 + compatible = "gpio-keys"; 49 + 50 + key-1 { 51 + linux,code = <KEY_1>; 52 + label = "SW3"; 53 + wakeup-source; 54 + debounce-interval = <20>; 55 + gpios = <&gpio6 11 GPIO_ACTIVE_LOW>; 56 + }; 57 + }; 58 + 59 + x12_clk: x12 { 60 + compatible = "fixed-clock"; 61 + #clock-cells = <0>; 62 + clock-frequency = <24576000>; 63 + }; 64 + 65 + vcc_sdhi0: regulator-vcc-sdhi0 { 66 + compatible = "regulator-fixed"; 67 + 68 + regulator-name = "SDHI0 Vcc"; 69 + regulator-min-microvolt = <3300000>; 70 + regulator-max-microvolt = <3300000>; 71 + 72 + gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>; 73 + enable-active-high; 74 + }; 75 + 76 + vccq_sdhi0: regulator-vccq-sdhi0 { 77 + compatible = "regulator-gpio"; 78 + 79 + regulator-name = "SDHI0 VccQ"; 80 + regulator-min-microvolt = <1800000>; 81 + regulator-max-microvolt = <3300000>; 82 + 83 + gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; 84 + gpios-states = <1>; 85 + states = <3300000 1 86 + 1800000 0>; 87 + }; 88 + 89 + audio_clkout: audio-clkout { 90 + /* 91 + * This is same as <&rcar_sound 0> 92 + * but needed to avoid cs2000/rcar_sound probe dead-lock 93 + */ 94 + compatible = "fixed-clock"; 95 + #clock-cells = <0>; 96 + clock-frequency = <11289600>; 97 + }; 98 + 99 + rsnd_ak4613: sound { 100 + compatible = "simple-audio-card"; 101 + 102 + simple-audio-card,format = "left_j"; 103 + simple-audio-card,bitclock-master = <&sndcpu>; 104 + simple-audio-card,frame-master = <&sndcpu>; 105 + 106 + sndcpu: simple-audio-card,cpu { 107 + sound-dai = <&rcar_sound>; 108 + }; 109 + 110 + sndcodec: simple-audio-card,codec { 111 + sound-dai = <&ak4613>; 112 + }; 113 + }; 114 + }; 115 + 116 + &extal_clk { 117 + clock-frequency = <16666666>; 118 + }; 119 + 120 + &extalr_clk { 121 + clock-frequency = <32768>; 122 + }; 123 + 124 + &pfc { 125 + pinctrl-0 = <&scif_clk_pins>; 126 + pinctrl-names = "default"; 127 + 128 + scif2_pins: scif2 { 129 + groups = "scif2_data_a"; 130 + function = "scif2"; 131 + }; 132 + 133 + scif_clk_pins: scif_clk { 134 + groups = "scif_clk_a"; 135 + function = "scif_clk"; 136 + }; 137 + 138 + i2c2_pins: i2c2 { 139 + groups = "i2c2_a"; 140 + function = "i2c2"; 141 + }; 142 + 143 + avb_pins: avb { 144 + groups = "avb_mdc"; 145 + function = "avb"; 146 + }; 147 + 148 + sdhi0_pins_3v3: sd0_3v3 { 149 + groups = "sdhi0_data4", "sdhi0_ctrl"; 150 + function = "sdhi0"; 151 + power-source = <3300>; 152 + }; 153 + 154 + sdhi0_pins_1v8: sd0_1v8 { 155 + groups = "sdhi0_data4", "sdhi0_ctrl"; 156 + function = "sdhi0"; 157 + power-source = <1800>; 158 + }; 159 + 160 + sound_pins: sound { 161 + groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; 162 + function = "ssi"; 163 + }; 164 + 165 + sound_clk_pins: sound-clk { 166 + groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a", 167 + "audio_clkout_a", "audio_clkout3_a"; 168 + function = "audio_clk"; 169 + }; 170 + 171 + usb1_pins: usb1 { 172 + groups = "usb1"; 173 + function = "usb1"; 174 + }; 175 + }; 176 + 177 + &scif2 { 178 + pinctrl-0 = <&scif2_pins>; 179 + pinctrl-names = "default"; 180 + 181 + status = "okay"; 182 + }; 183 + 184 + &scif_clk { 185 + clock-frequency = <14745600>; 186 + status = "okay"; 187 + }; 188 + 189 + &i2c2 { 190 + pinctrl-0 = <&i2c2_pins>; 191 + pinctrl-names = "default"; 192 + 193 + status = "okay"; 194 + 195 + clock-frequency = <100000>; 196 + 197 + ak4613: codec@10 { 198 + compatible = "asahi-kasei,ak4613"; 199 + #sound-dai-cells = <0>; 200 + reg = <0x10>; 201 + clocks = <&rcar_sound 3>; 202 + 203 + asahi-kasei,in1-single-end; 204 + asahi-kasei,in2-single-end; 205 + asahi-kasei,out1-single-end; 206 + asahi-kasei,out2-single-end; 207 + asahi-kasei,out3-single-end; 208 + asahi-kasei,out4-single-end; 209 + asahi-kasei,out5-single-end; 210 + asahi-kasei,out6-single-end; 211 + }; 212 + 213 + cs2000: clk-multiplier@4f { 214 + #clock-cells = <0>; 215 + compatible = "cirrus,cs2000-cp"; 216 + reg = <0x4f>; 217 + clocks = <&audio_clkout>, <&x12_clk>; 218 + clock-names = "clk_in", "ref_clk"; 219 + 220 + assigned-clocks = <&cs2000>; 221 + assigned-clock-rates = <24576000>; /* 1/1 divide */ 222 + }; 223 + }; 224 + 225 + &rcar_sound { 226 + pinctrl-0 = <&sound_pins &sound_clk_pins>; 227 + pinctrl-names = "default"; 228 + 229 + /* Single DAI */ 230 + #sound-dai-cells = <0>; 231 + 232 + /* audio_clkout0/1/2/3 */ 233 + #clock-cells = <1>; 234 + clock-frequency = <11289600>; 235 + 236 + status = "okay"; 237 + 238 + /* update <audio_clk_b> to <cs2000> */ 239 + clocks = <&cpg CPG_MOD 1005>, 240 + <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>, 241 + <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>, 242 + <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>, 243 + <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>, 244 + <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>, 245 + <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>, 246 + <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>, 247 + <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>, 248 + <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>, 249 + <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>, 250 + <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>, 251 + <&audio_clk_a>, <&cs2000>, 252 + <&audio_clk_c>, 253 + <&cpg CPG_CORE R8A7795_CLK_S0D4>; 254 + 255 + rcar_sound,dai { 256 + dai0 { 257 + playback = <&ssi0 &src0 &dvc0>; 258 + capture = <&ssi1 &src1 &dvc1>; 259 + }; 260 + }; 261 + }; 262 + 263 + &sdhi0 { 264 + pinctrl-0 = <&sdhi0_pins_3v3>; 265 + pinctrl-1 = <&sdhi0_pins_1v8>; 266 + pinctrl-names = "default", "state_uhs"; 267 + 268 + vmmc-supply = <&vcc_sdhi0>; 269 + vqmmc-supply = <&vccq_sdhi0>; 270 + cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; 271 + bus-width = <4>; 272 + sd-uhs-sdr50; 273 + status = "okay"; 274 + }; 275 + 276 + &ssi1 { 277 + shared-pin; 278 + }; 279 + 280 + &wdt0 { 281 + timeout-sec = <60>; 282 + status = "okay"; 283 + }; 284 + 285 + &audio_clk_a { 286 + clock-frequency = <22579200>; 287 + }; 288 + 289 + &avb { 290 + pinctrl-0 = <&avb_pins>; 291 + pinctrl-names = "default"; 292 + renesas,no-ether-link; 293 + phy-handle = <&phy0>; 294 + status = "okay"; 295 + 296 + phy0: ethernet-phy@0 { 297 + rxc-skew-ps = <900>; 298 + rxdv-skew-ps = <0>; 299 + rxd0-skew-ps = <0>; 300 + rxd1-skew-ps = <0>; 301 + rxd2-skew-ps = <0>; 302 + rxd3-skew-ps = <0>; 303 + txc-skew-ps = <900>; 304 + txen-skew-ps = <0>; 305 + txd0-skew-ps = <0>; 306 + txd1-skew-ps = <0>; 307 + txd2-skew-ps = <0>; 308 + txd3-skew-ps = <0>; 309 + reg = <0>; 310 + interrupt-parent = <&gpio2>; 311 + interrupts = <11 IRQ_TYPE_LEVEL_LOW>; 312 + }; 313 + }; 314 + 315 + &usb2_phy1 { 316 + pinctrl-0 = <&usb1_pins>; 317 + pinctrl-names = "default"; 318 + 319 + status = "okay"; 320 + }; 321 + 322 + &ehci1 { 323 + status = "okay"; 324 + }; 325 + 326 + &ohci1 { 327 + status = "okay"; 328 + };
+87
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
··· 110 110 1800000 0>; 111 111 }; 112 112 113 + vbus0_usb2: regulator-vbus0-usb2 { 114 + compatible = "regulator-fixed"; 115 + 116 + regulator-name = "USB20_VBUS0"; 117 + regulator-min-microvolt = <5000000>; 118 + regulator-max-microvolt = <5000000>; 119 + 120 + gpio = <&gpio6 16 GPIO_ACTIVE_HIGH>; 121 + enable-active-high; 122 + }; 123 + 113 124 audio_clkout: audio_clkout { 114 125 /* 115 126 * This is same as <&rcar_sound 0> ··· 144 133 145 134 sndcodec: simple-audio-card,codec { 146 135 sound-dai = <&ak4613>; 136 + }; 137 + }; 138 + 139 + vga-encoder { 140 + compatible = "adi,adv7123"; 141 + 142 + ports { 143 + #address-cells = <1>; 144 + #size-cells = <0>; 145 + 146 + port@0 { 147 + reg = <0>; 148 + adv7123_in: endpoint { 149 + remote-endpoint = <&du_out_rgb>; 150 + }; 151 + }; 152 + port@1 { 153 + reg = <1>; 154 + adv7123_out: endpoint { 155 + remote-endpoint = <&vga_in>; 156 + }; 157 + }; 158 + }; 159 + }; 160 + 161 + vga { 162 + compatible = "vga-connector"; 163 + 164 + port { 165 + vga_in: endpoint { 166 + remote-endpoint = <&adv7123_out>; 167 + }; 168 + }; 169 + }; 170 + }; 171 + 172 + &du { 173 + pinctrl-0 = <&du_pins>; 174 + pinctrl-names = "default"; 175 + status = "okay"; 176 + 177 + ports { 178 + port@0 { 179 + endpoint { 180 + remote-endpoint = <&adv7123_in>; 181 + }; 147 182 }; 148 183 }; 149 184 }; ··· 229 172 function = "avb"; 230 173 }; 231 174 175 + du_pins: du { 176 + groups = "du_rgb888", "du_sync", "du_oddf", "du_clk_out_0"; 177 + function = "du"; 178 + }; 179 + 232 180 sdhi0_pins: sd0 { 233 181 groups = "sdhi0_data4", "sdhi0_ctrl"; 234 182 function = "sdhi0"; ··· 253 191 groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a", 254 192 "audio_clkout_a", "audio_clkout3_a"; 255 193 function = "audio_clk"; 194 + }; 195 + 196 + usb0_pins: usb0 { 197 + groups = "usb0"; 198 + function = "usb0"; 256 199 }; 257 200 258 201 usb1_pins: usb1 { ··· 436 369 status = "okay"; 437 370 }; 438 371 372 + &usb2_phy0 { 373 + pinctrl-0 = <&usb0_pins>; 374 + pinctrl-names = "default"; 375 + 376 + vbus-supply = <&vbus0_usb2>; 377 + status = "okay"; 378 + }; 379 + 439 380 &usb2_phy1 { 440 381 pinctrl-0 = <&usb1_pins>; 441 382 pinctrl-names = "default"; ··· 458 383 status = "okay"; 459 384 }; 460 385 386 + &ehci0 { 387 + status = "okay"; 388 + }; 389 + 461 390 &ehci1 { 462 391 status = "okay"; 463 392 }; ··· 470 391 status = "okay"; 471 392 }; 472 393 394 + &ohci0 { 395 + status = "okay"; 396 + }; 397 + 473 398 &ohci1 { 474 399 status = "okay"; 475 400 }; 476 401 477 402 &ohci2 { 403 + status = "okay"; 404 + }; 405 + 406 + &hsusb { 478 407 status = "okay"; 479 408 }; 480 409
+272 -4
arch/arm64/boot/dts/renesas/r8a7795.dtsi
··· 328 328 }; 329 329 330 330 audma0: dma-controller@ec700000 { 331 - compatible = "renesas,rcar-dmac"; 331 + compatible = "renesas,dmac-r8a7795", 332 + "renesas,rcar-dmac"; 332 333 reg = <0 0xec700000 0 0x10000>; 333 334 interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH 334 335 GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH ··· 361 360 }; 362 361 363 362 audma1: dma-controller@ec720000 { 364 - compatible = "renesas,rcar-dmac"; 363 + compatible = "renesas,dmac-r8a7795", 364 + "renesas,rcar-dmac"; 365 365 reg = <0 0xec720000 0 0x10000>; 366 366 interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH 367 367 GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH ··· 1100 1098 reg = <0 0xee100000 0 0x2000>; 1101 1099 interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>; 1102 1100 clocks = <&cpg CPG_MOD 314>; 1101 + max-frequency = <200000000>; 1103 1102 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1104 1103 status = "disabled"; 1105 1104 }; ··· 1110 1107 reg = <0 0xee120000 0 0x2000>; 1111 1108 interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>; 1112 1109 clocks = <&cpg CPG_MOD 313>; 1110 + max-frequency = <200000000>; 1113 1111 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1114 1112 status = "disabled"; 1115 1113 }; ··· 1120 1116 reg = <0 0xee140000 0 0x2000>; 1121 1117 interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>; 1122 1118 clocks = <&cpg CPG_MOD 312>; 1119 + max-frequency = <200000000>; 1123 1120 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1124 - cap-mmc-highspeed; 1125 1121 status = "disabled"; 1126 1122 }; 1127 1123 ··· 1130 1126 reg = <0 0xee160000 0 0x2000>; 1131 1127 interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>; 1132 1128 clocks = <&cpg CPG_MOD 311>; 1129 + max-frequency = <200000000>; 1133 1130 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1134 - cap-mmc-highspeed; 1135 1131 status = "disabled"; 1136 1132 }; 1137 1133 ··· 1228 1224 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1229 1225 status = "disabled"; 1230 1226 }; 1227 + 1228 + hsusb: usb@e6590000 { 1229 + compatible = "renesas,usbhs-r8a7795", 1230 + "renesas,rcar-gen3-usbhs"; 1231 + reg = <0 0xe6590000 0 0x100>; 1232 + interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>; 1233 + clocks = <&cpg CPG_MOD 704>; 1234 + dmas = <&usb_dmac0 0>, <&usb_dmac0 1>, 1235 + <&usb_dmac1 0>, <&usb_dmac1 1>; 1236 + dma-names = "ch0", "ch1", "ch2", "ch3"; 1237 + renesas,buswait = <11>; 1238 + phys = <&usb2_phy0>; 1239 + phy-names = "usb"; 1240 + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1241 + status = "disabled"; 1242 + }; 1243 + 1231 1244 pciec0: pcie@fe000000 { 1232 1245 compatible = "renesas,pcie-r8a7795"; 1233 1246 reg = <0 0xfe000000 0 0x80000>; ··· 1293 1272 clock-names = "pcie", "pcie_bus"; 1294 1273 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1295 1274 status = "disabled"; 1275 + }; 1276 + 1277 + vspbc: vsp@fe920000 { 1278 + compatible = "renesas,vsp2"; 1279 + reg = <0 0xfe920000 0 0x8000>; 1280 + interrupts = <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>; 1281 + clocks = <&cpg CPG_MOD 624>; 1282 + power-domains = <&sysc R8A7795_PD_A3VP>; 1283 + 1284 + renesas,fcp = <&fcpvb1>; 1285 + }; 1286 + 1287 + fcpvb1: fcp@fe92f000 { 1288 + compatible = "renesas,r8a7795-fcpv", "renesas,fcpv"; 1289 + reg = <0 0xfe92f000 0 0x200>; 1290 + clocks = <&cpg CPG_MOD 606>; 1291 + power-domains = <&sysc R8A7795_PD_A3VP>; 1292 + }; 1293 + 1294 + fcpf0: fcp@fe950000 { 1295 + compatible = "renesas,r8a7795-fcpf", "renesas,fcpf"; 1296 + reg = <0 0xfe950000 0 0x200>; 1297 + clocks = <&cpg CPG_MOD 615>; 1298 + power-domains = <&sysc R8A7795_PD_A3VP>; 1299 + }; 1300 + 1301 + fcpf1: fcp@fe951000 { 1302 + compatible = "renesas,r8a7795-fcpf", "renesas,fcpf"; 1303 + reg = <0 0xfe951000 0 0x200>; 1304 + clocks = <&cpg CPG_MOD 614>; 1305 + power-domains = <&sysc R8A7795_PD_A3VP>; 1306 + }; 1307 + 1308 + fcpf2: fcp@fe952000 { 1309 + compatible = "renesas,r8a7795-fcpf", "renesas,fcpf"; 1310 + reg = <0 0xfe952000 0 0x200>; 1311 + clocks = <&cpg CPG_MOD 613>; 1312 + power-domains = <&sysc R8A7795_PD_A3VP>; 1313 + }; 1314 + 1315 + vspbd: vsp@fe960000 { 1316 + compatible = "renesas,vsp2"; 1317 + reg = <0 0xfe960000 0 0x8000>; 1318 + interrupts = <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>; 1319 + clocks = <&cpg CPG_MOD 626>; 1320 + power-domains = <&sysc R8A7795_PD_A3VP>; 1321 + 1322 + renesas,fcp = <&fcpvb0>; 1323 + }; 1324 + 1325 + fcpvb0: fcp@fe96f000 { 1326 + compatible = "renesas,r8a7795-fcpv", "renesas,fcpv"; 1327 + reg = <0 0xfe96f000 0 0x200>; 1328 + clocks = <&cpg CPG_MOD 607>; 1329 + power-domains = <&sysc R8A7795_PD_A3VP>; 1330 + }; 1331 + 1332 + vspi0: vsp@fe9a0000 { 1333 + compatible = "renesas,vsp2"; 1334 + reg = <0 0xfe9a0000 0 0x8000>; 1335 + interrupts = <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>; 1336 + clocks = <&cpg CPG_MOD 631>; 1337 + power-domains = <&sysc R8A7795_PD_A3VP>; 1338 + 1339 + renesas,fcp = <&fcpvi0>; 1340 + }; 1341 + 1342 + fcpvi0: fcp@fe9af000 { 1343 + compatible = "renesas,r8a7795-fcpv", "renesas,fcpv"; 1344 + reg = <0 0xfe9af000 0 0x200>; 1345 + clocks = <&cpg CPG_MOD 611>; 1346 + power-domains = <&sysc R8A7795_PD_A3VP>; 1347 + }; 1348 + 1349 + vspi1: vsp@fe9b0000 { 1350 + compatible = "renesas,vsp2"; 1351 + reg = <0 0xfe9b0000 0 0x8000>; 1352 + interrupts = <GIC_SPI 445 IRQ_TYPE_LEVEL_HIGH>; 1353 + clocks = <&cpg CPG_MOD 630>; 1354 + power-domains = <&sysc R8A7795_PD_A3VP>; 1355 + 1356 + renesas,fcp = <&fcpvi1>; 1357 + }; 1358 + 1359 + fcpvi1: fcp@fe9bf000 { 1360 + compatible = "renesas,r8a7795-fcpv", "renesas,fcpv"; 1361 + reg = <0 0xfe9bf000 0 0x200>; 1362 + clocks = <&cpg CPG_MOD 610>; 1363 + power-domains = <&sysc R8A7795_PD_A3VP>; 1364 + }; 1365 + 1366 + vspi2: vsp@fe9c0000 { 1367 + compatible = "renesas,vsp2"; 1368 + reg = <0 0xfe9c0000 0 0x8000>; 1369 + interrupts = <GIC_SPI 446 IRQ_TYPE_LEVEL_HIGH>; 1370 + clocks = <&cpg CPG_MOD 629>; 1371 + power-domains = <&sysc R8A7795_PD_A3VP>; 1372 + 1373 + renesas,fcp = <&fcpvi2>; 1374 + }; 1375 + 1376 + fcpvi2: fcp@fe9cf000 { 1377 + compatible = "renesas,r8a7795-fcpv", "renesas,fcpv"; 1378 + reg = <0 0xfe9cf000 0 0x200>; 1379 + clocks = <&cpg CPG_MOD 609>; 1380 + power-domains = <&sysc R8A7795_PD_A3VP>; 1381 + }; 1382 + 1383 + vspd0: vsp@fea20000 { 1384 + compatible = "renesas,vsp2"; 1385 + reg = <0 0xfea20000 0 0x4000>; 1386 + interrupts = <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>; 1387 + clocks = <&cpg CPG_MOD 623>; 1388 + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1389 + 1390 + renesas,fcp = <&fcpvd0>; 1391 + }; 1392 + 1393 + fcpvd0: fcp@fea27000 { 1394 + compatible = "renesas,r8a7795-fcpv", "renesas,fcpv"; 1395 + reg = <0 0xfea27000 0 0x200>; 1396 + clocks = <&cpg CPG_MOD 603>; 1397 + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1398 + }; 1399 + 1400 + vspd1: vsp@fea28000 { 1401 + compatible = "renesas,vsp2"; 1402 + reg = <0 0xfea28000 0 0x4000>; 1403 + interrupts = <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>; 1404 + clocks = <&cpg CPG_MOD 622>; 1405 + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1406 + 1407 + renesas,fcp = <&fcpvd1>; 1408 + }; 1409 + 1410 + fcpvd1: fcp@fea2f000 { 1411 + compatible = "renesas,r8a7795-fcpv", "renesas,fcpv"; 1412 + reg = <0 0xfea2f000 0 0x200>; 1413 + clocks = <&cpg CPG_MOD 602>; 1414 + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1415 + }; 1416 + 1417 + vspd2: vsp@fea30000 { 1418 + compatible = "renesas,vsp2"; 1419 + reg = <0 0xfea30000 0 0x4000>; 1420 + interrupts = <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>; 1421 + clocks = <&cpg CPG_MOD 621>; 1422 + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1423 + 1424 + renesas,fcp = <&fcpvd2>; 1425 + }; 1426 + 1427 + fcpvd2: fcp@fea37000 { 1428 + compatible = "renesas,r8a7795-fcpv", "renesas,fcpv"; 1429 + reg = <0 0xfea37000 0 0x200>; 1430 + clocks = <&cpg CPG_MOD 601>; 1431 + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1432 + }; 1433 + 1434 + vspd3: vsp@fea38000 { 1435 + compatible = "renesas,vsp2"; 1436 + reg = <0 0xfea38000 0 0x4000>; 1437 + interrupts = <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>; 1438 + clocks = <&cpg CPG_MOD 620>; 1439 + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1440 + 1441 + renesas,fcp = <&fcpvd3>; 1442 + }; 1443 + 1444 + fcpvd3: fcp@fea3f000 { 1445 + compatible = "renesas,r8a7795-fcpv", "renesas,fcpv"; 1446 + reg = <0 0xfea3f000 0 0x200>; 1447 + clocks = <&cpg CPG_MOD 600>; 1448 + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1449 + }; 1450 + 1451 + fdp1@fe940000 { 1452 + compatible = "renesas,fdp1"; 1453 + reg = <0 0xfe940000 0 0x2400>; 1454 + interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>; 1455 + clocks = <&cpg CPG_MOD 119>; 1456 + power-domains = <&sysc R8A7795_PD_A3VP>; 1457 + renesas,fcp = <&fcpf0>; 1458 + }; 1459 + 1460 + fdp1@fe944000 { 1461 + compatible = "renesas,fdp1"; 1462 + reg = <0 0xfe944000 0 0x2400>; 1463 + interrupts = <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>; 1464 + clocks = <&cpg CPG_MOD 118>; 1465 + power-domains = <&sysc R8A7795_PD_A3VP>; 1466 + renesas,fcp = <&fcpf1>; 1467 + }; 1468 + 1469 + fdp1@fe948000 { 1470 + compatible = "renesas,fdp1"; 1471 + reg = <0 0xfe948000 0 0x2400>; 1472 + interrupts = <GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>; 1473 + clocks = <&cpg CPG_MOD 117>; 1474 + power-domains = <&sysc R8A7795_PD_A3VP>; 1475 + renesas,fcp = <&fcpf2>; 1476 + }; 1477 + 1478 + du: display@feb00000 { 1479 + compatible = "renesas,du-r8a7795"; 1480 + reg = <0 0xfeb00000 0 0x80000>, 1481 + <0 0xfeb90000 0 0x14>; 1482 + reg-names = "du", "lvds.0"; 1483 + interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>, 1484 + <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>, 1485 + <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>, 1486 + <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>; 1487 + clocks = <&cpg CPG_MOD 724>, 1488 + <&cpg CPG_MOD 723>, 1489 + <&cpg CPG_MOD 722>, 1490 + <&cpg CPG_MOD 721>, 1491 + <&cpg CPG_MOD 727>; 1492 + clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0"; 1493 + status = "disabled"; 1494 + 1495 + vsps = <&vspd0 &vspd1 &vspd2 &vspd3>; 1496 + 1497 + ports { 1498 + #address-cells = <1>; 1499 + #size-cells = <0>; 1500 + 1501 + port@0 { 1502 + reg = <0>; 1503 + du_out_rgb: endpoint { 1504 + }; 1505 + }; 1506 + port@1 { 1507 + reg = <1>; 1508 + du_out_hdmi0: endpoint { 1509 + }; 1510 + }; 1511 + port@2 { 1512 + reg = <2>; 1513 + du_out_hdmi1: endpoint { 1514 + }; 1515 + }; 1516 + port@3 { 1517 + reg = <3>; 1518 + du_out_lvds0: endpoint { 1519 + }; 1520 + }; 1521 + }; 1296 1522 }; 1297 1523 }; 1298 1524 };
+16
arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
··· 31 31 }; 32 32 }; 33 33 34 + &pfc { 35 + pinctrl-0 = <&scif_clk_pins>; 36 + pinctrl-names = "default"; 37 + 38 + scif2_pins: scif2 { 39 + groups = "scif2_data_a"; 40 + function = "scif2"; 41 + }; 42 + scif_clk_pins: scif_clk { 43 + groups = "scif_clk_a"; 44 + function = "scif_clk"; 45 + }; 46 + }; 47 + 34 48 &extal_clk { 35 49 clock-frequency = <16666666>; 36 50 }; 37 51 38 52 &scif2 { 53 + pinctrl-0 = <&scif2_pins>; 54 + pinctrl-names = "default"; 39 55 status = "okay"; 40 56 }; 41 57
+117
arch/arm64/boot/dts/renesas/r8a7796.dtsi
··· 107 107 status = "disabled"; 108 108 }; 109 109 110 + gpio0: gpio@e6050000 { 111 + compatible = "renesas,gpio-r8a7796", 112 + "renesas,gpio-rcar"; 113 + reg = <0 0xe6050000 0 0x50>; 114 + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; 115 + #gpio-cells = <2>; 116 + gpio-controller; 117 + gpio-ranges = <&pfc 0 0 16>; 118 + #interrupt-cells = <2>; 119 + interrupt-controller; 120 + clocks = <&cpg CPG_MOD 912>; 121 + power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 122 + }; 123 + 124 + gpio1: gpio@e6051000 { 125 + compatible = "renesas,gpio-r8a7796", 126 + "renesas,gpio-rcar"; 127 + reg = <0 0xe6051000 0 0x50>; 128 + interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>; 129 + #gpio-cells = <2>; 130 + gpio-controller; 131 + gpio-ranges = <&pfc 0 32 29>; 132 + #interrupt-cells = <2>; 133 + interrupt-controller; 134 + clocks = <&cpg CPG_MOD 911>; 135 + power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 136 + }; 137 + 138 + gpio2: gpio@e6052000 { 139 + compatible = "renesas,gpio-r8a7796", 140 + "renesas,gpio-rcar"; 141 + reg = <0 0xe6052000 0 0x50>; 142 + interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; 143 + #gpio-cells = <2>; 144 + gpio-controller; 145 + gpio-ranges = <&pfc 0 64 15>; 146 + #interrupt-cells = <2>; 147 + interrupt-controller; 148 + clocks = <&cpg CPG_MOD 910>; 149 + power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 150 + }; 151 + 152 + gpio3: gpio@e6053000 { 153 + compatible = "renesas,gpio-r8a7796", 154 + "renesas,gpio-rcar"; 155 + reg = <0 0xe6053000 0 0x50>; 156 + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 157 + #gpio-cells = <2>; 158 + gpio-controller; 159 + gpio-ranges = <&pfc 0 96 16>; 160 + #interrupt-cells = <2>; 161 + interrupt-controller; 162 + clocks = <&cpg CPG_MOD 909>; 163 + power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 164 + }; 165 + 166 + gpio4: gpio@e6054000 { 167 + compatible = "renesas,gpio-r8a7796", 168 + "renesas,gpio-rcar"; 169 + reg = <0 0xe6054000 0 0x50>; 170 + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; 171 + #gpio-cells = <2>; 172 + gpio-controller; 173 + gpio-ranges = <&pfc 0 128 18>; 174 + #interrupt-cells = <2>; 175 + interrupt-controller; 176 + clocks = <&cpg CPG_MOD 908>; 177 + power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 178 + }; 179 + 180 + gpio5: gpio@e6055000 { 181 + compatible = "renesas,gpio-r8a7796", 182 + "renesas,gpio-rcar"; 183 + reg = <0 0xe6055000 0 0x50>; 184 + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; 185 + #gpio-cells = <2>; 186 + gpio-controller; 187 + gpio-ranges = <&pfc 0 160 26>; 188 + #interrupt-cells = <2>; 189 + interrupt-controller; 190 + clocks = <&cpg CPG_MOD 907>; 191 + power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 192 + }; 193 + 194 + gpio6: gpio@e6055400 { 195 + compatible = "renesas,gpio-r8a7796", 196 + "renesas,gpio-rcar"; 197 + reg = <0 0xe6055400 0 0x50>; 198 + interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; 199 + #gpio-cells = <2>; 200 + gpio-controller; 201 + gpio-ranges = <&pfc 0 192 32>; 202 + #interrupt-cells = <2>; 203 + interrupt-controller; 204 + clocks = <&cpg CPG_MOD 906>; 205 + power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 206 + }; 207 + 208 + gpio7: gpio@e6055800 { 209 + compatible = "renesas,gpio-r8a7796", 210 + "renesas,gpio-rcar"; 211 + reg = <0 0xe6055800 0 0x50>; 212 + interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; 213 + #gpio-cells = <2>; 214 + gpio-controller; 215 + gpio-ranges = <&pfc 0 224 4>; 216 + #interrupt-cells = <2>; 217 + interrupt-controller; 218 + clocks = <&cpg CPG_MOD 905>; 219 + power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 220 + }; 221 + 222 + pfc: pin-controller@e6060000 { 223 + compatible = "renesas,pfc-r8a7796"; 224 + reg = <0 0xe6060000 0 0x50c>; 225 + }; 226 + 110 227 cpg: clock-controller@e6150000 { 111 228 compatible = "renesas,r8a7796-cpg-mssr"; 112 229 reg = <0 0xe6150000 0 0x1000>;
+9 -9
drivers/clk/meson/gxbb.h
··· 183 183 /* CLKID_CLK81 */ 184 184 #define CLKID_MPLL0 13 185 185 #define CLKID_MPLL1 14 186 - #define CLKID_MPLL2 15 186 + /* CLKID_MPLL2 */ 187 187 #define CLKID_DDR 16 188 188 #define CLKID_DOS 17 189 189 #define CLKID_ISA 18 190 190 #define CLKID_PL301 19 191 191 #define CLKID_PERIPHS 20 192 192 #define CLKID_SPICC 21 193 - #define CLKID_I2C 22 193 + /* CLKID_I2C */ 194 194 #define CLKID_SAR_ADC 23 195 195 #define CLKID_SMART_CARD 24 196 196 #define CLKID_RNG0 25 ··· 202 202 #define CLKID_ABUF 31 203 203 #define CLKID_HIU_IFACE 32 204 204 #define CLKID_ASSIST_MISC 33 205 - #define CLKID_SPI 34 205 + /* CLKID_SPI */ 206 206 #define CLKID_I2S_SPDIF 35 207 207 #define CLKID_ETH 36 208 208 #define CLKID_DEMUX 37 ··· 218 218 #define CLKID_AIU 47 219 219 #define CLKID_UART1 48 220 220 #define CLKID_G2D 49 221 - #define CLKID_USB0 50 222 - #define CLKID_USB1 51 221 + /* CLKID_USB0 */ 222 + /* CLKID_USB1 */ 223 223 #define CLKID_RESET 52 224 224 #define CLKID_NAND 53 225 225 #define CLKID_DOS_PARSER 54 226 - #define CLKID_USB 55 226 + /* CLKID_USB */ 227 227 #define CLKID_VDIN1 56 228 228 #define CLKID_AHB_ARB0 57 229 229 #define CLKID_EFUSE 58 ··· 232 232 #define CLKID_AHB_CTRL_BUS 61 233 233 #define CLKID_HDMI_INTR_SYNC 62 234 234 #define CLKID_HDMI_PCLK 63 235 - #define CLKID_USB1_DDR_BRIDGE 64 236 - #define CLKID_USB0_DDR_BRIDGE 65 235 + /* CLKID_USB1_DDR_BRIDGE */ 236 + /* CLKID_USB0_DDR_BRIDGE */ 237 237 #define CLKID_MMC_PCLK 66 238 238 #define CLKID_DVIN 67 239 239 #define CLKID_UART2 68 ··· 261 261 #define CLKID_AO_AHB_SRAM 90 262 262 #define CLKID_AO_AHB_BUS 91 263 263 #define CLKID_AO_IFACE 92 264 - #define CLKID_AO_I2C 93 264 + /* CLKID_AO_I2C */ 265 265 /* CLKID_SD_EMMC_A */ 266 266 /* CLKID_SD_EMMC_B */ 267 267 /* CLKID_SD_EMMC_C */
+3 -3
drivers/net/ethernet/stmicro/stmmac/Kconfig
··· 61 61 config DWMAC_MESON 62 62 tristate "Amlogic Meson dwmac support" 63 63 default ARCH_MESON 64 - depends on OF && (ARCH_MESON || COMPILE_TEST) 64 + depends on OF && COMMON_CLK && (ARCH_MESON || COMPILE_TEST) 65 65 help 66 66 Support for Ethernet controller on Amlogic Meson SoCs. 67 67 68 68 This selects the Amlogic Meson SoC glue layer support for 69 - the stmmac device driver. This driver is used for Meson6 and 70 - Meson8 SoCs. 69 + the stmmac device driver. This driver is used for Meson6, 70 + Meson8, Meson8b and GXBB SoCs. 71 71 72 72 config DWMAC_ROCKCHIP 73 73 tristate "Rockchip dwmac support"
+1 -1
drivers/net/ethernet/stmicro/stmmac/Makefile
··· 9 9 obj-$(CONFIG_STMMAC_PLATFORM) += stmmac-platform.o 10 10 obj-$(CONFIG_DWMAC_IPQ806X) += dwmac-ipq806x.o 11 11 obj-$(CONFIG_DWMAC_LPC18XX) += dwmac-lpc18xx.o 12 - obj-$(CONFIG_DWMAC_MESON) += dwmac-meson.o 12 + obj-$(CONFIG_DWMAC_MESON) += dwmac-meson.o dwmac-meson8b.o 13 13 obj-$(CONFIG_DWMAC_ROCKCHIP) += dwmac-rk.o 14 14 obj-$(CONFIG_DWMAC_SOCFPGA) += dwmac-altr-socfpga.o 15 15 obj-$(CONFIG_DWMAC_STI) += dwmac-sti.o
+2 -2
drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
··· 1 1 /* 2 - * Amlogic Meson DWMAC glue layer 2 + * Amlogic Meson6 and Meson8 DWMAC glue layer 3 3 * 4 4 * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com> 5 5 * ··· 96 96 module_platform_driver(meson6_dwmac_driver); 97 97 98 98 MODULE_AUTHOR("Beniamino Galvani <b.galvani@gmail.com>"); 99 - MODULE_DESCRIPTION("Amlogic Meson DWMAC glue layer"); 99 + MODULE_DESCRIPTION("Amlogic Meson6 and Meson8 DWMAC glue layer"); 100 100 MODULE_LICENSE("GPL v2");
+324
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
··· 1 + /* 2 + * Amlogic Meson8b and GXBB DWMAC glue layer 3 + * 4 + * Copyright (C) 2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com> 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License version 2 as 8 + * published by the Free Software Foundation. 9 + * 10 + * You should have received a copy of the GNU General Public License 11 + * along with this program. If not, see <http://www.gnu.org/licenses/>. 12 + */ 13 + 14 + #include <linux/clk.h> 15 + #include <linux/clk-provider.h> 16 + #include <linux/device.h> 17 + #include <linux/ethtool.h> 18 + #include <linux/io.h> 19 + #include <linux/ioport.h> 20 + #include <linux/module.h> 21 + #include <linux/of_net.h> 22 + #include <linux/mfd/syscon.h> 23 + #include <linux/platform_device.h> 24 + #include <linux/stmmac.h> 25 + 26 + #include "stmmac_platform.h" 27 + 28 + #define PRG_ETH0 0x0 29 + 30 + #define PRG_ETH0_RGMII_MODE BIT(0) 31 + 32 + /* mux to choose between fclk_div2 (bit unset) and mpll2 (bit set) */ 33 + #define PRG_ETH0_CLK_M250_SEL_SHIFT 4 34 + #define PRG_ETH0_CLK_M250_SEL_MASK GENMASK(4, 4) 35 + 36 + #define PRG_ETH0_TXDLY_SHIFT 5 37 + #define PRG_ETH0_TXDLY_MASK GENMASK(6, 5) 38 + #define PRG_ETH0_TXDLY_OFF (0x0 << PRG_ETH0_TXDLY_SHIFT) 39 + #define PRG_ETH0_TXDLY_QUARTER (0x1 << PRG_ETH0_TXDLY_SHIFT) 40 + #define PRG_ETH0_TXDLY_HALF (0x2 << PRG_ETH0_TXDLY_SHIFT) 41 + #define PRG_ETH0_TXDLY_THREE_QUARTERS (0x3 << PRG_ETH0_TXDLY_SHIFT) 42 + 43 + /* divider for the result of m250_sel */ 44 + #define PRG_ETH0_CLK_M250_DIV_SHIFT 7 45 + #define PRG_ETH0_CLK_M250_DIV_WIDTH 3 46 + 47 + /* divides the result of m25_sel by either 5 (bit unset) or 10 (bit set) */ 48 + #define PRG_ETH0_CLK_M25_DIV_SHIFT 10 49 + #define PRG_ETH0_CLK_M25_DIV_WIDTH 1 50 + 51 + #define PRG_ETH0_INVERTED_RMII_CLK BIT(11) 52 + #define PRG_ETH0_TX_AND_PHY_REF_CLK BIT(12) 53 + 54 + #define MUX_CLK_NUM_PARENTS 2 55 + 56 + struct meson8b_dwmac { 57 + struct platform_device *pdev; 58 + 59 + void __iomem *regs; 60 + 61 + phy_interface_t phy_mode; 62 + 63 + struct clk_mux m250_mux; 64 + struct clk *m250_mux_clk; 65 + struct clk *m250_mux_parent[MUX_CLK_NUM_PARENTS]; 66 + 67 + struct clk_divider m250_div; 68 + struct clk *m250_div_clk; 69 + 70 + struct clk_divider m25_div; 71 + struct clk *m25_div_clk; 72 + }; 73 + 74 + static void meson8b_dwmac_mask_bits(struct meson8b_dwmac *dwmac, u32 reg, 75 + u32 mask, u32 value) 76 + { 77 + u32 data; 78 + 79 + data = readl(dwmac->regs + reg); 80 + data &= ~mask; 81 + data |= (value & mask); 82 + 83 + writel(data, dwmac->regs + reg); 84 + } 85 + 86 + static int meson8b_init_clk(struct meson8b_dwmac *dwmac) 87 + { 88 + struct clk_init_data init; 89 + int i, ret; 90 + struct device *dev = &dwmac->pdev->dev; 91 + char clk_name[32]; 92 + const char *clk_div_parents[1]; 93 + const char *mux_parent_names[MUX_CLK_NUM_PARENTS]; 94 + static struct clk_div_table clk_25m_div_table[] = { 95 + { .val = 0, .div = 5 }, 96 + { .val = 1, .div = 10 }, 97 + { /* sentinel */ }, 98 + }; 99 + 100 + /* get the mux parents from DT */ 101 + for (i = 0; i < MUX_CLK_NUM_PARENTS; i++) { 102 + char name[16]; 103 + 104 + snprintf(name, sizeof(name), "clkin%d", i); 105 + dwmac->m250_mux_parent[i] = devm_clk_get(dev, name); 106 + if (IS_ERR(dwmac->m250_mux_parent[i])) { 107 + ret = PTR_ERR(dwmac->m250_mux_parent[i]); 108 + if (ret != -EPROBE_DEFER) 109 + dev_err(dev, "Missing clock %s\n", name); 110 + return ret; 111 + } 112 + 113 + mux_parent_names[i] = 114 + __clk_get_name(dwmac->m250_mux_parent[i]); 115 + } 116 + 117 + /* create the m250_mux */ 118 + snprintf(clk_name, sizeof(clk_name), "%s#m250_sel", dev_name(dev)); 119 + init.name = clk_name; 120 + init.ops = &clk_mux_ops; 121 + init.flags = 0; 122 + init.parent_names = mux_parent_names; 123 + init.num_parents = MUX_CLK_NUM_PARENTS; 124 + 125 + dwmac->m250_mux.reg = dwmac->regs + PRG_ETH0; 126 + dwmac->m250_mux.shift = PRG_ETH0_CLK_M250_SEL_SHIFT; 127 + dwmac->m250_mux.mask = PRG_ETH0_CLK_M250_SEL_MASK; 128 + dwmac->m250_mux.flags = 0; 129 + dwmac->m250_mux.table = NULL; 130 + dwmac->m250_mux.hw.init = &init; 131 + 132 + dwmac->m250_mux_clk = devm_clk_register(dev, &dwmac->m250_mux.hw); 133 + if (WARN_ON(IS_ERR(dwmac->m250_mux_clk))) 134 + return PTR_ERR(dwmac->m250_mux_clk); 135 + 136 + /* create the m250_div */ 137 + snprintf(clk_name, sizeof(clk_name), "%s#m250_div", dev_name(dev)); 138 + init.name = devm_kstrdup(dev, clk_name, GFP_KERNEL); 139 + init.ops = &clk_divider_ops; 140 + init.flags = CLK_SET_RATE_PARENT; 141 + clk_div_parents[0] = __clk_get_name(dwmac->m250_mux_clk); 142 + init.parent_names = clk_div_parents; 143 + init.num_parents = ARRAY_SIZE(clk_div_parents); 144 + 145 + dwmac->m250_div.reg = dwmac->regs + PRG_ETH0; 146 + dwmac->m250_div.shift = PRG_ETH0_CLK_M250_DIV_SHIFT; 147 + dwmac->m250_div.width = PRG_ETH0_CLK_M250_DIV_WIDTH; 148 + dwmac->m250_div.hw.init = &init; 149 + dwmac->m250_div.flags = CLK_DIVIDER_ONE_BASED | CLK_DIVIDER_ALLOW_ZERO; 150 + 151 + dwmac->m250_div_clk = devm_clk_register(dev, &dwmac->m250_div.hw); 152 + if (WARN_ON(IS_ERR(dwmac->m250_div_clk))) 153 + return PTR_ERR(dwmac->m250_div_clk); 154 + 155 + /* create the m25_div */ 156 + snprintf(clk_name, sizeof(clk_name), "%s#m25_div", dev_name(dev)); 157 + init.name = devm_kstrdup(dev, clk_name, GFP_KERNEL); 158 + init.ops = &clk_divider_ops; 159 + init.flags = CLK_IS_BASIC | CLK_SET_RATE_PARENT; 160 + clk_div_parents[0] = __clk_get_name(dwmac->m250_div_clk); 161 + init.parent_names = clk_div_parents; 162 + init.num_parents = ARRAY_SIZE(clk_div_parents); 163 + 164 + dwmac->m25_div.reg = dwmac->regs + PRG_ETH0; 165 + dwmac->m25_div.shift = PRG_ETH0_CLK_M25_DIV_SHIFT; 166 + dwmac->m25_div.width = PRG_ETH0_CLK_M25_DIV_WIDTH; 167 + dwmac->m25_div.table = clk_25m_div_table; 168 + dwmac->m25_div.hw.init = &init; 169 + dwmac->m25_div.flags = CLK_DIVIDER_ALLOW_ZERO; 170 + 171 + dwmac->m25_div_clk = devm_clk_register(dev, &dwmac->m25_div.hw); 172 + if (WARN_ON(IS_ERR(dwmac->m25_div_clk))) 173 + return PTR_ERR(dwmac->m25_div_clk); 174 + 175 + return 0; 176 + } 177 + 178 + static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) 179 + { 180 + int ret; 181 + unsigned long clk_rate; 182 + 183 + switch (dwmac->phy_mode) { 184 + case PHY_INTERFACE_MODE_RGMII: 185 + case PHY_INTERFACE_MODE_RGMII_ID: 186 + case PHY_INTERFACE_MODE_RGMII_RXID: 187 + case PHY_INTERFACE_MODE_RGMII_TXID: 188 + /* Generate a 25MHz clock for the PHY */ 189 + clk_rate = 25 * 1000 * 1000; 190 + 191 + /* enable RGMII mode */ 192 + meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, PRG_ETH0_RGMII_MODE, 193 + PRG_ETH0_RGMII_MODE); 194 + 195 + /* only relevant for RMII mode -> disable in RGMII mode */ 196 + meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, 197 + PRG_ETH0_INVERTED_RMII_CLK, 0); 198 + 199 + /* TX clock delay - all known boards use a 1/4 cycle delay */ 200 + meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, PRG_ETH0_TXDLY_MASK, 201 + PRG_ETH0_TXDLY_QUARTER); 202 + break; 203 + 204 + case PHY_INTERFACE_MODE_RMII: 205 + /* Use the rate of the mux clock for the internal RMII PHY */ 206 + clk_rate = clk_get_rate(dwmac->m250_mux_clk); 207 + 208 + /* disable RGMII mode -> enables RMII mode */ 209 + meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, PRG_ETH0_RGMII_MODE, 210 + 0); 211 + 212 + /* invert internal clk_rmii_i to generate 25/2.5 tx_rx_clk */ 213 + meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, 214 + PRG_ETH0_INVERTED_RMII_CLK, 215 + PRG_ETH0_INVERTED_RMII_CLK); 216 + 217 + /* TX clock delay cannot be configured in RMII mode */ 218 + meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, PRG_ETH0_TXDLY_MASK, 219 + 0); 220 + 221 + break; 222 + 223 + default: 224 + dev_err(&dwmac->pdev->dev, "unsupported phy-mode %s\n", 225 + phy_modes(dwmac->phy_mode)); 226 + return -EINVAL; 227 + } 228 + 229 + ret = clk_prepare_enable(dwmac->m25_div_clk); 230 + if (ret) { 231 + dev_err(&dwmac->pdev->dev, "failed to enable the PHY clock\n"); 232 + return ret; 233 + } 234 + 235 + ret = clk_set_rate(dwmac->m25_div_clk, clk_rate); 236 + if (ret) { 237 + clk_disable_unprepare(dwmac->m25_div_clk); 238 + 239 + dev_err(&dwmac->pdev->dev, "failed to set PHY clock\n"); 240 + return ret; 241 + } 242 + 243 + /* enable TX_CLK and PHY_REF_CLK generator */ 244 + meson8b_dwmac_mask_bits(dwmac, PRG_ETH0, PRG_ETH0_TX_AND_PHY_REF_CLK, 245 + PRG_ETH0_TX_AND_PHY_REF_CLK); 246 + 247 + return 0; 248 + } 249 + 250 + static int meson8b_dwmac_probe(struct platform_device *pdev) 251 + { 252 + struct plat_stmmacenet_data *plat_dat; 253 + struct stmmac_resources stmmac_res; 254 + struct resource *res; 255 + struct meson8b_dwmac *dwmac; 256 + int ret; 257 + 258 + ret = stmmac_get_platform_resources(pdev, &stmmac_res); 259 + if (ret) 260 + return ret; 261 + 262 + plat_dat = stmmac_probe_config_dt(pdev, &stmmac_res.mac); 263 + if (IS_ERR(plat_dat)) 264 + return PTR_ERR(plat_dat); 265 + 266 + dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL); 267 + if (!dwmac) 268 + return -ENOMEM; 269 + 270 + res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 271 + dwmac->regs = devm_ioremap_resource(&pdev->dev, res); 272 + if (IS_ERR(dwmac->regs)) 273 + return PTR_ERR(dwmac->regs); 274 + 275 + dwmac->pdev = pdev; 276 + dwmac->phy_mode = of_get_phy_mode(pdev->dev.of_node); 277 + if (dwmac->phy_mode < 0) { 278 + dev_err(&pdev->dev, "missing phy-mode property\n"); 279 + return -EINVAL; 280 + } 281 + 282 + ret = meson8b_init_clk(dwmac); 283 + if (ret) 284 + return ret; 285 + 286 + ret = meson8b_init_prg_eth(dwmac); 287 + if (ret) 288 + return ret; 289 + 290 + plat_dat->bsp_priv = dwmac; 291 + 292 + return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); 293 + } 294 + 295 + static int meson8b_dwmac_remove(struct platform_device *pdev) 296 + { 297 + struct meson8b_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev); 298 + 299 + clk_disable_unprepare(dwmac->m25_div_clk); 300 + 301 + return stmmac_pltfr_remove(pdev); 302 + } 303 + 304 + static const struct of_device_id meson8b_dwmac_match[] = { 305 + { .compatible = "amlogic,meson8b-dwmac" }, 306 + { .compatible = "amlogic,meson-gxbb-dwmac" }, 307 + { } 308 + }; 309 + MODULE_DEVICE_TABLE(of, meson8b_dwmac_match); 310 + 311 + static struct platform_driver meson8b_dwmac_driver = { 312 + .probe = meson8b_dwmac_probe, 313 + .remove = meson8b_dwmac_remove, 314 + .driver = { 315 + .name = "meson8b-dwmac", 316 + .pm = &stmmac_pltfr_pm_ops, 317 + .of_match_table = meson8b_dwmac_match, 318 + }, 319 + }; 320 + module_platform_driver(meson8b_dwmac_driver); 321 + 322 + MODULE_AUTHOR("Martin Blumenstingl <martin.blumenstingl@googlemail.com>"); 323 + MODULE_DESCRIPTION("Amlogic Meson8b and GXBB DWMAC glue layer"); 324 + MODULE_LICENSE("GPL v2");
+8
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
··· 30 30 int stmmac_pltfr_remove(struct platform_device *pdev); 31 31 extern const struct dev_pm_ops stmmac_pltfr_pm_ops; 32 32 33 + static inline void *get_stmmac_bsp_priv(struct device *dev) 34 + { 35 + struct net_device *ndev = dev_get_drvdata(dev); 36 + struct stmmac_priv *priv = netdev_priv(ndev); 37 + 38 + return priv->plat->bsp_priv; 39 + } 40 + 33 41 #endif /* __STMMAC_PLATFORM_H__ */
+34
drivers/usb/dwc2/platform.c
··· 182 182 .hibernation = -1, 183 183 }; 184 184 185 + static const struct dwc2_core_params params_amlogic = { 186 + .otg_cap = DWC2_CAP_PARAM_NO_HNP_SRP_CAPABLE, 187 + .otg_ver = -1, 188 + .dma_enable = 1, 189 + .dma_desc_enable = 0, 190 + .dma_desc_fs_enable = 0, 191 + .speed = DWC2_SPEED_PARAM_HIGH, 192 + .enable_dynamic_fifo = 1, 193 + .en_multiple_tx_fifo = -1, 194 + .host_rx_fifo_size = 512, 195 + .host_nperio_tx_fifo_size = 500, 196 + .host_perio_tx_fifo_size = 500, 197 + .max_transfer_size = -1, 198 + .max_packet_count = -1, 199 + .host_channels = 16, 200 + .phy_type = DWC2_PHY_TYPE_PARAM_UTMI, 201 + .phy_utmi_width = -1, 202 + .phy_ulpi_ddr = -1, 203 + .phy_ulpi_ext_vbus = -1, 204 + .i2c_enable = -1, 205 + .ulpi_fs_ls = -1, 206 + .host_support_fs_ls_low_power = -1, 207 + .host_ls_low_power_phy_clk = -1, 208 + .ts_dline = -1, 209 + .reload_ctl = 1, 210 + .ahbcfg = GAHBCFG_HBSTLEN_INCR8 << 211 + GAHBCFG_HBSTLEN_SHIFT, 212 + .uframe_sched = 0, 213 + .external_id_pin_ctl = -1, 214 + .hibernation = -1, 215 + }; 216 + 185 217 /* 186 218 * Check the dr_mode against the module configuration and hardware 187 219 * capabilities. ··· 518 486 { .compatible = "lantiq,xrx200-usb", .data = &params_ltq }, 519 487 { .compatible = "snps,dwc2", .data = NULL }, 520 488 { .compatible = "samsung,s3c6400-hsotg", .data = NULL}, 489 + { .compatible = "amlogic,meson8b-usb", .data = &params_amlogic }, 490 + { .compatible = "amlogic,meson-gxbb-usb", .data = &params_amlogic }, 521 491 {}, 522 492 }; 523 493 MODULE_DEVICE_TABLE(of, dwc2_of_match_table);
+9
include/dt-bindings/clock/gxbb-clkc.h
··· 11 11 #define CLKID_FCLK_DIV3 5 12 12 #define CLKID_FCLK_DIV4 6 13 13 #define CLKID_CLK81 12 14 + #define CLKID_MPLL2 15 15 + #define CLKID_SPI 34 16 + #define CLKID_I2C 22 14 17 #define CLKID_ETH 36 18 + #define CLKID_USB0 50 19 + #define CLKID_USB1 51 20 + #define CLKID_USB 55 21 + #define CLKID_USB1_DDR_BRIDGE 64 22 + #define CLKID_USB0_DDR_BRIDGE 65 23 + #define CLKID_AO_I2C 93 15 24 #define CLKID_SD_EMMC_A 94 16 25 #define CLKID_SD_EMMC_B 95 17 26 #define CLKID_SD_EMMC_C 96