xref: /freebsd/sys/contrib/device-tree/src/arm64/rockchip/rk3566-anbernic-rg353vs.dts (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
18bab661aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
28bab661aSEmmanuel Vadot
38bab661aSEmmanuel Vadot/dts-v1/;
48bab661aSEmmanuel Vadot
58bab661aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
68bab661aSEmmanuel Vadot#include <dt-bindings/input/linux-event-codes.h>
78bab661aSEmmanuel Vadot#include <dt-bindings/pinctrl/rockchip.h>
88bab661aSEmmanuel Vadot#include "rk3566-anbernic-rg353x.dtsi"
98bab661aSEmmanuel Vadot
108bab661aSEmmanuel Vadot/ {
11*7d0873ebSEmmanuel Vadot	model = "Anbernic RG353VS";
128bab661aSEmmanuel Vadot	compatible = "anbernic,rg353vs", "rockchip,rk3566";
138bab661aSEmmanuel Vadot
148bab661aSEmmanuel Vadot	aliases {
158bab661aSEmmanuel Vadot		mmc0 = &sdmmc0;
168bab661aSEmmanuel Vadot		mmc1 = &sdmmc1;
178bab661aSEmmanuel Vadot		mmc2 = &sdmmc2;
188bab661aSEmmanuel Vadot	};
198bab661aSEmmanuel Vadot
208bab661aSEmmanuel Vadot	battery: battery {
218bab661aSEmmanuel Vadot		compatible = "simple-battery";
228bab661aSEmmanuel Vadot		charge-full-design-microamp-hours = <3151000>;
238bab661aSEmmanuel Vadot		charge-term-current-microamp = <300000>;
248bab661aSEmmanuel Vadot		constant-charge-current-max-microamp = <2000000>;
258bab661aSEmmanuel Vadot		constant-charge-voltage-max-microvolt = <4200000>;
268bab661aSEmmanuel Vadot		factory-internal-resistance-micro-ohms = <117000>;
278bab661aSEmmanuel Vadot		voltage-max-design-microvolt = <4172000>;
288bab661aSEmmanuel Vadot		voltage-min-design-microvolt = <3400000>;
298bab661aSEmmanuel Vadot
308bab661aSEmmanuel Vadot		ocv-capacity-celsius = <20>;
318bab661aSEmmanuel Vadot		ocv-capacity-table-0 =  <4172000 100>, <4054000 95>, <3984000 90>, <3926000 85>,
328bab661aSEmmanuel Vadot					<3874000 80>, <3826000 75>, <3783000 70>, <3746000 65>,
338bab661aSEmmanuel Vadot					<3714000 60>, <3683000 55>, <3650000 50>, <3628000 45>,
348bab661aSEmmanuel Vadot					<3612000 40>, <3600000 35>, <3587000 30>, <3571000 25>,
358bab661aSEmmanuel Vadot					<3552000 20>, <3525000 15>, <3492000 10>, <3446000 5>,
368bab661aSEmmanuel Vadot					<3400000 0>;
378bab661aSEmmanuel Vadot	};
388bab661aSEmmanuel Vadot
398bab661aSEmmanuel Vadot	/* Channels reversed for headphones. */
408bab661aSEmmanuel Vadot	sound {
418bab661aSEmmanuel Vadot		compatible = "simple-audio-card";
428bab661aSEmmanuel Vadot		simple-audio-card,name = "rk817_int";
438bab661aSEmmanuel Vadot		simple-audio-card,format = "i2s";
448bab661aSEmmanuel Vadot		simple-audio-card,hp-det-gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
458bab661aSEmmanuel Vadot		simple-audio-card,mclk-fs = <256>;
468bab661aSEmmanuel Vadot		simple-audio-card,widgets =
478bab661aSEmmanuel Vadot			"Microphone", "Mic Jack",
488bab661aSEmmanuel Vadot			"Headphone", "Headphones",
498bab661aSEmmanuel Vadot			"Speaker", "Internal Speakers";
508bab661aSEmmanuel Vadot		simple-audio-card,routing =
518bab661aSEmmanuel Vadot			"MICL", "Mic Jack",
528bab661aSEmmanuel Vadot			"Headphones", "HPOL",
538bab661aSEmmanuel Vadot			"Headphones", "HPOR",
548bab661aSEmmanuel Vadot			"Internal Speakers", "SPKO";
558bab661aSEmmanuel Vadot
568bab661aSEmmanuel Vadot		simple-audio-card,codec {
578bab661aSEmmanuel Vadot			sound-dai = <&rk817>;
588bab661aSEmmanuel Vadot		};
598bab661aSEmmanuel Vadot
608bab661aSEmmanuel Vadot		simple-audio-card,cpu {
618bab661aSEmmanuel Vadot			sound-dai = <&i2s1_8ch>;
628bab661aSEmmanuel Vadot		};
638bab661aSEmmanuel Vadot	};
648bab661aSEmmanuel Vadot};
658bab661aSEmmanuel Vadot
668bab661aSEmmanuel Vadot&gpio_keys_control {
678bab661aSEmmanuel Vadot	button-r1 {
688bab661aSEmmanuel Vadot		gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
698bab661aSEmmanuel Vadot		label = "TR";
708bab661aSEmmanuel Vadot		linux,code = <BTN_TR>;
718bab661aSEmmanuel Vadot	};
728bab661aSEmmanuel Vadot
738bab661aSEmmanuel Vadot	button-r2 {
748bab661aSEmmanuel Vadot		gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
758bab661aSEmmanuel Vadot		label = "TR2";
768bab661aSEmmanuel Vadot		linux,code = <BTN_TR2>;
778bab661aSEmmanuel Vadot	};
788bab661aSEmmanuel Vadot};
798bab661aSEmmanuel Vadot
808bab661aSEmmanuel Vadot&rk817 {
818bab661aSEmmanuel Vadot	rk817_charger: charger {
828bab661aSEmmanuel Vadot		monitored-battery = <&battery>;
838bab661aSEmmanuel Vadot		rockchip,resistor-sense-micro-ohms = <10000>;
848bab661aSEmmanuel Vadot		rockchip,sleep-enter-current-microamp = <300000>;
858bab661aSEmmanuel Vadot		rockchip,sleep-filter-current-microamp = <100000>;
868bab661aSEmmanuel Vadot	};
878bab661aSEmmanuel Vadot};
88