mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-02 08:32:55 +00:00

The Chameleon board is an OpenHardware devboard made by YuzukiTsuru. The form factor resembles the Raspberry Pi Model A boards, though it differs significantly in its features: - Allwinner H618 SoC (4 * Arm Cortex-A53 cores, 1MB L2 cache, 1.4 GHz) - between 512MiB and 2GiB DDR3 DRAM - up to 128 GiB eMMC flash - AXP313a PMIC - 100 Mbit/s Ethernet pins on a header - XR829 WIFI+Bluetooth chip - 4 * USB 2.0 USB-C ports - microSD card slot - 3.5mm A/V port Add the devicetree describing the board's peripherals and their connections. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://patch.msgid.link/20250307005712.16828-16-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai <wens@csie.org>
223 lines
4.4 KiB
Plaintext
223 lines
4.4 KiB
Plaintext
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
|
/*
|
|
* Copyright (C) 2024 Arm Ltd.
|
|
*/
|
|
|
|
/dts-v1/;
|
|
|
|
#include "sun50i-h616.dtsi"
|
|
#include "sun50i-h616-cpu-opp.dtsi"
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
|
|
|
/ {
|
|
model = "Yuzuki Chameleon";
|
|
compatible = "yuzukihd,chameleon", "allwinner,sun50i-h618";
|
|
|
|
aliases {
|
|
ethernet1 = &sdio_wifi;
|
|
serial0 = &uart0;
|
|
};
|
|
|
|
chosen {
|
|
stdout-path = "serial0:115200n8";
|
|
};
|
|
|
|
reg_vcc5v: vcc5v {
|
|
/* board wide 5V supply directly from the USB-C socket */
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vcc-5v";
|
|
regulator-min-microvolt = <5000000>;
|
|
regulator-max-microvolt = <5000000>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
wifi_pwrseq: pwrseq {
|
|
compatible = "mmc-pwrseq-simple";
|
|
clocks = <&rtc CLK_OSC32K_FANOUT>;
|
|
clock-names = "ext_clock";
|
|
pinctrl-0 = <&x32clk_fanout_pin>;
|
|
pinctrl-names = "default";
|
|
reset-gpios = <&pio 6 11 GPIO_ACTIVE_LOW>; /* PG11 */
|
|
};
|
|
};
|
|
|
|
&codec {
|
|
allwinner,audio-routing = "Line Out", "LINEOUT";
|
|
status = "okay";
|
|
};
|
|
|
|
&cpu0 {
|
|
cpu-supply = <®_dcdc2>;
|
|
};
|
|
|
|
&ehci0 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ehci1 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ehci2 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ehci3 {
|
|
status = "okay";
|
|
};
|
|
|
|
&mmc0 {
|
|
bus-width = <4>;
|
|
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
|
disable-wp;
|
|
vmmc-supply = <®_dldo1>;
|
|
status = "okay";
|
|
};
|
|
|
|
&mmc1 {
|
|
bus-width = <4>;
|
|
mmc-pwrseq = <&wifi_pwrseq>;
|
|
non-removable;
|
|
vmmc-supply = <®_dldo1>;
|
|
vqmmc-supply = <®_dldo1>;
|
|
status = "okay";
|
|
|
|
sdio_wifi: wifi@1 {
|
|
reg = <1>;
|
|
interrupt-parent = <&pio>;
|
|
interrupts = <6 12 IRQ_TYPE_LEVEL_LOW>; /* PG12 */
|
|
interrupt-names = "host-wake";
|
|
};
|
|
};
|
|
|
|
&mmc2 {
|
|
bus-width = <8>;
|
|
cap-mmc-hw-reset;
|
|
mmc-ddr-3_3v;
|
|
non-removable;
|
|
vmmc-supply = <®_dldo1>;
|
|
vqmmc-supply = <®_dldo1>;
|
|
status = "okay";
|
|
};
|
|
|
|
&ohci0 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ohci1 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ohci2 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ohci3 {
|
|
status = "okay";
|
|
};
|
|
|
|
&pio {
|
|
vcc-pc-supply = <®_dldo1>;
|
|
vcc-pf-supply = <®_dldo1>; /* via VCC_IO */
|
|
vcc-pg-supply = <®_dldo1>;
|
|
vcc-ph-supply = <®_dldo1>; /* via VCC_IO */
|
|
vcc-pi-supply = <®_dldo1>;
|
|
};
|
|
|
|
&r_i2c {
|
|
status = "okay";
|
|
|
|
axp313: pmic@36 {
|
|
compatible = "x-powers,axp313a";
|
|
reg = <0x36>;
|
|
#interrupt-cells = <1>;
|
|
interrupt-controller;
|
|
interrupt-parent = <&pio>;
|
|
interrupts = <2 2 IRQ_TYPE_LEVEL_LOW>; /* PC2 */
|
|
|
|
vin1-supply = <®_vcc5v>;
|
|
vin2-supply = <®_vcc5v>;
|
|
vin3-supply = <®_vcc5v>;
|
|
|
|
regulators {
|
|
/* Supplies VCC-PLL, so needs to be always on. */
|
|
reg_aldo1: aldo1 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-name = "vcc1v8";
|
|
};
|
|
|
|
/* Supplies VCC-IO, so needs to be always on. */
|
|
reg_dldo1: dldo1 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-name = "vcc3v3";
|
|
};
|
|
|
|
reg_dcdc1: dcdc1 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <810000>;
|
|
regulator-max-microvolt = <990000>;
|
|
regulator-name = "vdd-gpu-sys";
|
|
};
|
|
|
|
reg_dcdc2: dcdc2 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <810000>;
|
|
regulator-max-microvolt = <1100000>;
|
|
regulator-name = "vdd-cpu";
|
|
};
|
|
|
|
reg_dcdc3: dcdc3 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <1500000>;
|
|
regulator-max-microvolt = <1500000>;
|
|
regulator-name = "vdd-dram";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&uart0 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&uart0_ph_pins>;
|
|
status = "okay";
|
|
};
|
|
|
|
/* Connected to the Bluetooth UART pins of the XR829 Wifi/BT chip. */
|
|
&uart1 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
|
|
uart-has-rtscts;
|
|
status = "okay";
|
|
};
|
|
|
|
&usbotg {
|
|
/*
|
|
* PHY0 pins are connected to a USB-C socket, but a role switch
|
|
* is not implemented: both CC pins are pulled to GND.
|
|
* The VBUS pins power the device, so a fixed peripheral mode
|
|
* is the best choice.
|
|
* The board can be powered via GPIOs, in this case port0 *can*
|
|
* act as a host (with a cable/adapter ignoring CC), as VBUS is
|
|
* then provided by the GPIOs. Any user of this setup would
|
|
* need to adjust the DT accordingly: dr_mode set to "host",
|
|
* enabling OHCI0 and EHCI0.
|
|
*/
|
|
dr_mode = "peripheral";
|
|
status = "okay";
|
|
};
|
|
|
|
&usbphy {
|
|
usb0_id_det-gpios = <&pio 6 18 GPIO_ACTIVE_HIGH>; /* PG18 */
|
|
usb0_vbus-supply = <®_vcc5v>;
|
|
usb1_vbus-supply = <®_vcc5v>;
|
|
usb2_vbus-supply = <®_vcc5v>;
|
|
usb3_vbus-supply = <®_vcc5v>;
|
|
status = "okay";
|
|
};
|