SBC_builder/patch/kernel/sunxi-6.16/dt/sun50i-h618-bananapi-m4.dtsi
2025-08-27 10:16:25 +02:00

297 lines
5.4 KiB
Plaintext

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2025 Patrick Yavitz <pyavitz@armbian.com>
*/
/dts-v1/;
#include "sun50i-h616.dtsi"
#include "sun50i-h616-cpu-opp.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/leds/common.h>
/ {
aliases {
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
kaslr-seed = <0xfeedbeef 0xc0def00d>;
};
connector {
compatible = "hdmi-connector";
type = "d";
port {
hdmi_con_in: endpoint {
remote-endpoint = <&hdmi_out_con>;
};
};
};
reg_usb_vbus: regulator-usb-vbus {
/* Separate discrete regulator for the USB ports */
compatible = "regulator-fixed";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-name = "usb-vbus";
vin-supply = <&reg_vcc5v>;
};
reg_vcc5v: regulator-vcc5v {
/* Board wide 5V supply directly from the USB-C socket */
compatible = "regulator-fixed";
regulator-always-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-name = "vcc-5v";
};
reg_vcc3v3: regulator-vcc3v3 {
compatible = "regulator-fixed";
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-3v3";
vin-supply = <&reg_vcc5v>;
};
reg_vcc1v8: regulator-vcc1v8 {
compatible = "regulator-fixed";
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc-1v8";
vin-supply = <&reg_vcc3v3>;
};
wifi_pwrseq: wifi-pwrseq {
compatible = "mmc-pwrseq-simple";
clocks = <&rtc CLK_OSC32K_FANOUT>;
clock-names = "ext_clock";
pinctrl-0 = <&x32clk_fanout_pin>;
pinctrl-names = "default";
post-power-on-delay-ms = <200>;
reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */
};
};
&ahub_dam_plat {
status = "okay";
};
&ahub1_plat {
status = "okay";
};
&ahub1_mach {
status = "okay";
};
&codec {
status = "disabled";
allwinner,audio-routing = "Line Out", "LINEOUT";
};
&cpu0 {
cpu-supply = <&reg_dcdc2>;
};
&de {
status = "okay";
};
&gpu {
status = "disabled";
mali-supply = <&reg_dcdc1>;
};
&hdmi {
status = "okay";
};
&hdmi_out {
hdmi_out_con: endpoint {
remote-endpoint = <&hdmi_con_in>;
};
};
&i2c0 {
status = "disabled";
pinctrl-0 = <&i2c0_pins>;
pinctrl-names = "default";
};
&i2c1 {
status = "disabled";
pinctrl-0 = <&i2c1_pi_pins>;
pinctrl-names = "default";
};
&i2c3 {
status = "disabled";
pinctrl-0 = <&i2c3_pg_pins>;
pinctrl-names = "default";
};
&i2c4 {
status = "disabled";
pinctrl-0 = <&i2c4_pg_pins>;
pinctrl-names = "default";
};
&ir {
status = "disabled";
pinctrl-0 = <&ir_rx_pin>;
pinctrl-names = "default";
};
/* SD card */
&mmc0 {
status = "okay";
bus-width = <4>;
max-frequency = <50000000>;
disable-wp;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
vmmc-supply = <&reg_vcc3v3>;
};
/* eMMC */
&mmc2 {
status = "okay";
bus-width = <8>;
cap-mmc-hw-reset;
mmc-hs200-1_8v;
non-removable;
disable-wp;
vmmc-supply = <&reg_vcc3v3>;
vqmmc-supply = <&reg_vcc1v8>;
};
&pio {
vcc-pc-supply = <&reg_aldo1>;
vcc-pf-supply = <&reg_dldo1>;
vcc-pg-supply = <&reg_dldo1>;
vcc-ph-supply = <&reg_dldo1>;
vcc-pi-supply = <&reg_dldo1>;
/* PC0 required for spi0 */
mmc2_pins: mmc2-pins {
pins = "PC1", "PC5", "PC6",
"PC8", "PC9", "PC10", "PC11",
"PC13", "PC14", "PC15", "PC16";
function = "mmc2";
drive-strength = <30>;
bias-pull-up;
};
};
&r_i2c {
status = "okay";
axp313: pmic@36 {
compatible = "x-powers,axp313a";
reg = <0x36>;
#interrupt-cells = <1>;
interrupt-controller;
interrupt-parent = <&pio>;
vin1-supply = <&reg_vcc5v>;
vin2-supply = <&reg_vcc5v>;
vin3-supply = <&reg_vcc5v>;
regulators {
reg_aldo1: aldo1 {
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "vcc-1v8-pll";
};
reg_dldo1: dldo1 {
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-3v3-io";
};
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 = <1100000>;
regulator-max-microvolt = <1100000>;
regulator-name = "vdd-dram";
};
};
};
};
&spi0 {
status = "disabled";
pinctrl-0 = <&spi0_pins>, <&spi1_cs0_pin>;
pinctrl-names = "default";
spidev@1 {
compatible = "rohm,dh2228fv";
reg = <1>;
spi-max-frequency = <1000000>;
};
};
&spi1 {
status = "disabled";
pinctrl-0 = <&spi1_pins>, <&spi1_cs1_pin>;
pinctrl-names = "default";
spidev@1 {
compatible = "rohm,dh2228fv";
reg = <1>;
spi-max-frequency = <1000000>;
};
};
&uart0 {
status = "okay";
pinctrl-0 = <&uart0_ph_pins>;
pinctrl-names = "default";
};
&uart1 {
status = "disabled";
pinctrl-0 = <&uart1_pins>;
pinctrl-names = "default";
};
&uart4 {
status = "disabled";
pinctrl-0 = <&uart4_pi_pins>;
pinctrl-names = "default";
};
&uart5 {
status = "disabled";
pinctrl-0 = <&uart5_pins>;
pinctrl-names = "default";
};