Skip to content

Commit

Permalink
dts: add sun50i-a64-olinuxino-*
Browse files Browse the repository at this point in the history
  • Loading branch information
hehopmajieh authored and stefansaraev committed May 18, 2023
1 parent 9b4ed79 commit 0940983
Show file tree
Hide file tree
Showing 7 changed files with 589 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/arm64/boot/dts/allwinner/Makefile
Expand Up @@ -5,6 +5,11 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-nanopi-a64.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-oceanic-5205-5inmfd.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino-emmc.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino-1G.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino-1Ge4GW.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino-1Ge16GW.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino-1Gs16M.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino-2Ge8G.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-lts.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
Expand Down
370 changes: 370 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-1G.dts
@@ -0,0 +1,370 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (C) 2019 OLIMEX Ltd.
*
*/

/dts-v1/;

#include "sun50i-a64.dtsi"
#include "sun50i-a64-cpu-opp.dtsi"

#include <dt-bindings/gpio/gpio.h>

/ {
model = "Olimex A64-Olinuxino-1G";
compatible = "olimex,a64-olinuxino-1g", "allwinner,sun50i-a64";

aliases {
ethernet0 = &emac;
serial0 = &uart0;
serial2 = &uart3;
};

chosen {
stdout-path = "serial0:115200n8";
};

hdmi-connector {
compatible = "hdmi-connector";
type = "a";

port {
hdmi_con_in: endpoint {
remote-endpoint = <&hdmi_out_con>;
};
};
};

hdmi-sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "allwinner,hdmi";
simple-audio-card,mclk-fs = <256>;
status = "okay";

simple-audio-card,codec {
sound-dai = <&hdmi>;
};

simple-audio-card,cpu {
sound-dai = <&i2s2>;
};
};

reg_vcc_sys: vcc-sys {
compatible = "regulator-fixed";
regulator-name = "vcc-sys";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
status = "okay";
};

reg_usb1_vbus: usb1-vbus {
compatible = "regulator-fixed";
regulator-name = "usb1-vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
enable-active-high;
gpio = <&pio 6 9 GPIO_ACTIVE_HIGH>; /* PG9 */
status = "okay";
};
};

&codec {
status = "okay";
};

&codec_analog {
hpvcc-supply = <&reg_eldo1>;
status = "okay";
};

&dai {
status = "okay";
};

&de {
status = "okay";
};

&ehci0 {
status = "okay";
};

&ehci1 {
status = "okay";
};

&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
phy-mode = "rgmii";
phy-handle = <&ext_rgmii_phy>;
phy-supply = <&reg_dcdc1>;
allwinner,tx-delay-ps = <600>;
status = "okay";
};

&hdmi {
hvcc-supply = <&reg_dldo1>;
status = "okay";
};

&hdmi_out {
hdmi_out_con: endpoint {
remote-endpoint = <&hdmi_con_in>;
};
};

/* Exposed to UEXT connector */
&i2c1 {
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
status = "disabled";
};

&i2s2 {
status = "okay";
};

&mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
};
};

&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins>;
vmmc-supply = <&reg_dcdc1>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
disable-wp;
bus-width = <4>;
status = "okay";
};

&ohci0 {
status = "okay";
};

&ohci1 {
status = "okay";
};

&r_rsb {
status = "okay";

axp803: pmic@3a3 {
compatible = "x-powers,axp803";
reg = <0x3a3>;
interrupt-parent = <&r_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
};
};

#include "axp803.dtsi"

&ac_power_supply {
status = "okay";
};

&axp_led {
label = "axp20x:yellow:chgled";
status = "okay";
x-powers,charger-mode = <0>;
};

&battery_power_supply {
status = "okay";
};

&reg_aldo1 {
regulator-always-on;
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
regulator-name = "vcc-pe";
};

&reg_aldo2 {
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-pl";
};

&reg_aldo3 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "vcc-pll-avcc";
};

&reg_dcdc1 {
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-3v3";
};

&reg_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <1040000>;
regulator-max-microvolt = <1300000>;
regulator-name = "vdd-cpux";
};

/* DCDC3 is polyphased with DCDC2 */

/*
* The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal
* 1.35V that the PMIC can drive.
*/
&reg_dcdc5 {
regulator-always-on;
regulator-min-microvolt = <1360000>;
regulator-max-microvolt = <1360000>;
regulator-name = "vcc-ddr3";
};

&reg_dcdc6 {
regulator-always-on;
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
regulator-name = "vdd-sys";
};

&reg_dldo1 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-hdmi";
};

&reg_dldo2 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-mipi";
};

&reg_dldo3 {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
regulator-name = "vcc-avdd-csi";
};

&reg_dldo4 {
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-wifi-io";
};

&reg_drivevbus {
regulator-name = "usb0-vbus";
status = "okay";
};

&reg_eldo1 {
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc-emmc";
};

&reg_eldo2 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc-dvdd-csi";
};

&reg_fldo1 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-name = "vcc-1v2-hsic";
};

/*
* The A64 chip cannot work without this regulator off, although
* it seems to be only driving the AR100 core.
* Maybe we don't still know well about CPUs domain.
*/
&reg_fldo2 {
regulator-always-on;
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
regulator-name = "vdd-cpus";
};

&reg_rtc_ldo {
regulator-name = "vcc-rtc";
};

&simplefb_hdmi {
vcc-hdmi-supply = <&reg_dldo1>;
};

&sound {
simple-audio-card,aux-devs = <&codec_analog>;
simple-audio-card,widgets = "Microphone", "Microphone Jack Left",
"Microphone", "Microphone Jack Right",
"Headphone", "Headphone Jack";
simple-audio-card,routing = "Left DAC", "DACL",
"Right DAC", "DACR",
"Headphone Jack", "HP",
"ADCL", "Left ADC",
"ADCR", "Right ADC",
"Microphone Jack Left", "MBIAS",
"MIC1", "Microphone Jack Left",
"Microphone Jack Left", "HBIAS",
"MIC2", "Microphone Jack Right";
status = "okay";
};

&spdif {
status = "disabled";
};

/* Exposed on UEXT */
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
status = "disabled";
};

&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
status = "okay";
};

/* Exposed on UEXT */
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins>;
status = "disabled";
};

&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&uart3_ph_pins>;
status = "okay";
};

&usb_otg {
dr_mode = "otg";
status = "okay";
};

&usbphy {
status = "okay";
usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
usb0_vbus_det-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
usb0_vbus-supply = <&reg_drivevbus>;
usb1_vbus-supply = <&reg_usb1_vbus>;
};

0 comments on commit 0940983

Please sign in to comment.