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

ARM: dts: sun8i: h3: Add dts file for Libre Computer Board ALL-H3-CC H3 ver.

The Libre Computer Board ALL-H3-CC from Libre Technology is a Raspberry
Pi B+ form factor single board computer based on the Allwinner H3 SoC.
The board has 1GB DDR3 SDRAM, provided by 4 2Gb chips. The mounting holes
and connectors are in the exact same position as on the Raspberry Pi B+.

Raspberry Pi B+ like peripherals supported on this board include:

- Power input through micro-USB connector (without USB OTG)
- Native 100 Mbps ethernet using the internal PHY, as opposed to
USB-based on the RPi
- 4x USB 2.0 host ports, directly connected to the SoC, as opposed to
being connected through a USB 2.0 hub on the RPi
- TV and audio output on a 3.5mm TRRS jack
- HDMI output
- Micro-SD card slot
- Standard RPi B+ GPIO header, with the standard peripherals routed to
the same pins.

* 5V, 3.3V power, and ground
* I2C0 on the H3 is routed to I2C1 pins on the RPi header
* I2C1 on the H3 is routed to I2C0 pins on the RPi header
* UART1 on the H3 is routed to UART0 pins on the RPi header
* SPI0 on the H3 is routed to SPI0 pins on the RPi header,
with GPIO pin PA17 replacing the missing Chip Select 1
* I2S1 on the H3 is routed to PCM pins on the RPi header

- Additional peripherals from the H3 are available on different pins.
These include I2S0, JTAG, PWM1, SPDIF, SPI1, and UART3

In addition, there are a number of new features:

- Console UART header
- Consumer IR receiver
- Camera interface (not compatible with RPi)
- Onboard microphone
- eMMC expansion module port
- Heatsink mounting holes
- Power button

The power button requires corresponding software for the embedded
coprocessor to properly function.

This patch adds a dts file for this board that enables all "onboard"
peripherals currently supported. This means no display or camera
support.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

authored by

Chen-Yu Tsai and committed by
Maxime Ripard
6ca35864 38ecd220

+197
+1
arch/arm/boot/dts/Makefile
··· 953 953 sun8i-h2-plus-orangepi-zero.dtb \ 954 954 sun8i-h3-bananapi-m2-plus.dtb \ 955 955 sun8i-h3-beelink-x2.dtb \ 956 + sun8i-h3-libretech-all-h3-cc.dtb \ 956 957 sun8i-h3-nanopi-m1.dtb \ 957 958 sun8i-h3-nanopi-m1-plus.dtb \ 958 959 sun8i-h3-nanopi-neo.dtb \
+196
arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts
··· 1 + /* 2 + * Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org> 3 + * 4 + * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 5 + */ 6 + 7 + /dts-v1/; 8 + #include "sun8i-h3.dtsi" 9 + 10 + #include <dt-bindings/gpio/gpio.h> 11 + #include <dt-bindings/input/input.h> 12 + 13 + / { 14 + model = "Libre Computer Board ALL-H3-CC H3"; 15 + compatible = "libretech,all-h3-cc-h3", "allwinner,sun8i-h3"; 16 + 17 + aliases { 18 + ethernet0 = &emac; 19 + serial0 = &uart0; 20 + }; 21 + 22 + chosen { 23 + stdout-path = "serial0:115200n8"; 24 + }; 25 + 26 + leds { 27 + compatible = "gpio-leds"; 28 + 29 + pwr_led { 30 + label = "librecomputer:green:pwr"; 31 + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ 32 + default-state = "on"; 33 + }; 34 + 35 + status_led { 36 + label = "librecomputer:blue:status"; 37 + gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */ 38 + }; 39 + }; 40 + 41 + gpio_keys { 42 + compatible = "gpio-keys"; 43 + 44 + power { 45 + label = "power"; 46 + linux,code = <KEY_POWER>; 47 + gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ 48 + }; 49 + }; 50 + 51 + reg_vcc1v2: vcc1v2 { 52 + compatible = "regulator-fixed"; 53 + regulator-name = "vcc1v2"; 54 + regulator-min-microvolt = <3300000>; 55 + regulator-max-microvolt = <3300000>; 56 + regulator-always-on; 57 + regulator-boot-on; 58 + vin-supply = <&reg_vcc5v0>; 59 + gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ 60 + enable-active-high; 61 + }; 62 + 63 + reg_vcc3v3: vcc3v3 { 64 + compatible = "regulator-fixed"; 65 + regulator-name = "vcc3v3"; 66 + regulator-min-microvolt = <3300000>; 67 + regulator-max-microvolt = <3300000>; 68 + vin-supply = <&reg_vcc5v0>; 69 + }; 70 + 71 + /* This represents the board's 5V input */ 72 + reg_vcc5v0: vcc5v0 { 73 + compatible = "regulator-fixed"; 74 + regulator-name = "vcc5v0"; 75 + regulator-min-microvolt = <5000000>; 76 + regulator-max-microvolt = <5000000>; 77 + }; 78 + 79 + reg_vcc_dram: vcc-dram { 80 + compatible = "regulator-fixed"; 81 + regulator-name = "vcc-dram"; 82 + regulator-min-microvolt = <1500000>; 83 + regulator-max-microvolt = <1500000>; 84 + regulator-always-on; 85 + regulator-boot-on; 86 + vin-supply = <&reg_vcc5v0>; 87 + gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */ 88 + enable-active-high; 89 + }; 90 + 91 + reg_vcc_io: vcc-io { 92 + compatible = "regulator-fixed"; 93 + regulator-name = "vcc-io"; 94 + regulator-min-microvolt = <3300000>; 95 + regulator-max-microvolt = <3300000>; 96 + regulator-always-on; 97 + regulator-boot-on; 98 + vin-supply = <&reg_vcc3v3>; 99 + gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */ 100 + }; 101 + 102 + reg_vdd_cpux: vdd-cpux { 103 + compatible = "regulator-fixed"; 104 + regulator-name = "vdd-cpux"; 105 + regulator-min-microvolt = <3300000>; 106 + regulator-max-microvolt = <3300000>; 107 + regulator-always-on; 108 + regulator-boot-on; 109 + vin-supply = <&reg_vcc5v0>; 110 + gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ 111 + enable-active-high; 112 + }; 113 + }; 114 + 115 + &codec { 116 + allwinner,audio-routing = 117 + "Line Out", "LINEOUT", 118 + "MIC1", "Mic", 119 + "Mic", "MBIAS"; 120 + status = "okay"; 121 + }; 122 + 123 + &ehci0 { 124 + status = "okay"; 125 + }; 126 + 127 + &ehci1 { 128 + status = "okay"; 129 + }; 130 + 131 + &ehci2 { 132 + status = "okay"; 133 + }; 134 + 135 + &ehci3 { 136 + status = "okay"; 137 + }; 138 + 139 + &emac { 140 + phy-handle = <&int_mii_phy>; 141 + phy-mode = "mii"; 142 + allwinner,leds-active-low; 143 + status = "okay"; 144 + }; 145 + 146 + &ir { 147 + pinctrl-names = "default"; 148 + pinctrl-0 = <&ir_pins_a>; 149 + status = "okay"; 150 + }; 151 + 152 + &mmc0 { 153 + pinctrl-names = "default"; 154 + pinctrl-0 = <&mmc0_pins_a>; 155 + vmmc-supply = <&reg_vcc_io>; 156 + bus-width = <4>; 157 + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ 158 + cd-inverted; 159 + status = "okay"; 160 + }; 161 + 162 + &ohci0 { 163 + status = "okay"; 164 + }; 165 + 166 + &ohci1 { 167 + status = "okay"; 168 + }; 169 + 170 + &ohci2 { 171 + status = "okay"; 172 + }; 173 + 174 + &ohci3 { 175 + status = "okay"; 176 + }; 177 + 178 + &uart0 { 179 + pinctrl-names = "default"; 180 + pinctrl-0 = <&uart0_pins_a>; 181 + status = "okay"; 182 + }; 183 + 184 + &usb_otg { 185 + dr_mode = "host"; 186 + status = "okay"; 187 + }; 188 + 189 + &usbphy { 190 + /* VBUS on USB ports are always on */ 191 + usb0_vbus-supply = <&reg_vcc5v0>; 192 + usb1_vbus-supply = <&reg_vcc5v0>; 193 + usb2_vbus-supply = <&reg_vcc5v0>; 194 + usb3_vbus-supply = <&reg_vcc5v0>; 195 + status = "okay"; 196 + };