Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 /*
0003  * Copyright 2020 Pascal Roeleven <dev@pascalroeleven.nl>
0004  */
0005 
0006 /dts-v1/;
0007 #include "sun4i-a10.dtsi"
0008 #include "sunxi-common-regulators.dtsi"
0009 
0010 #include <dt-bindings/gpio/gpio.h>
0011 #include <dt-bindings/input/input.h>
0012 #include <dt-bindings/interrupt-controller/irq.h>
0013 #include <dt-bindings/pwm/pwm.h>
0014 
0015 / {
0016         model = "Topwise A721";
0017         compatible = "topwise,a721", "allwinner,sun4i-a10";
0018 
0019         aliases {
0020                 serial0 = &uart0;
0021         };
0022 
0023         backlight: backlight {
0024                 compatible = "pwm-backlight";
0025                 pwms = <&pwm 0 100000 PWM_POLARITY_INVERTED>;
0026                 power-supply = <&reg_vbat>;
0027                 enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
0028                 brightness-levels = <0 30 40 50 60 70 80 90 100>;
0029                 default-brightness-level = <8>;
0030         };
0031 
0032         chosen {
0033                 stdout-path = "serial0:115200n8";
0034         };
0035 
0036         panel {
0037                 compatible = "starry,kr070pe2t";
0038                 backlight = <&backlight>;
0039                 power-supply = <&reg_lcd_power>;
0040 
0041                 port {
0042                         panel_input: endpoint {
0043                                 remote-endpoint = <&tcon0_out_panel>;
0044                         };
0045                 };
0046         };
0047 
0048         reg_lcd_power: reg-lcd-power {
0049                 compatible = "regulator-fixed";
0050                 regulator-name = "reg-lcd-power";
0051                 gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
0052                 enable-active-high;
0053         };
0054 
0055         reg_vbat: reg-vbat {
0056                 compatible = "regulator-fixed";
0057                 regulator-name = "vbat";
0058                 regulator-min-microvolt = <3700000>;
0059                 regulator-max-microvolt = <3700000>;
0060         };
0061 
0062 };
0063 
0064 &codec {
0065         status = "okay";
0066 };
0067 
0068 &cpu0 {
0069         cpu-supply = <&reg_dcdc2>;
0070 };
0071 
0072 &de {
0073         status = "okay";
0074 };
0075 
0076 &ehci0 {
0077         status = "okay";
0078 };
0079 
0080 &ehci1 {
0081         status = "okay";
0082 };
0083 
0084 &i2c0 {
0085         status = "okay";
0086 
0087         axp209: pmic@34 {
0088                 reg = <0x34>;
0089                 interrupts = <0>;
0090         };
0091 };
0092 
0093 #include "axp209.dtsi"
0094 
0095 &ac_power_supply {
0096         status = "okay";
0097 };
0098 
0099 &battery_power_supply {
0100         status = "okay";
0101 };
0102 
0103 &i2c1 {
0104         status = "okay";
0105 
0106         accelerometer@4c {
0107                 compatible = "fsl,mma7660";
0108                 reg = <0x4c>;
0109         };
0110 };
0111 
0112 &i2c2 {
0113         status = "okay";
0114 
0115         touchscreen@38 {
0116                 compatible = "edt,edt-ft5406";
0117                 reg = <0x38>;
0118                 interrupt-parent = <&pio>;
0119                 interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
0120                 touchscreen-size-x = <800>;
0121                 touchscreen-size-y = <480>;
0122                 vcc-supply = <&reg_vcc3v3>;
0123         };
0124 };
0125 
0126 &lradc {
0127         vref-supply = <&reg_ldo2>;
0128         status = "okay";
0129 
0130         button-571 {
0131                 label = "Volume Up";
0132                 linux,code = <KEY_VOLUMEUP>;
0133                 channel = <0>;
0134                 voltage = <571428>;
0135         };
0136 
0137         button-761 {
0138                 label = "Volume Down";
0139                 linux,code = <KEY_VOLUMEDOWN>;
0140                 channel = <0>;
0141                 voltage = <761904>;
0142         };
0143 };
0144 
0145 &mmc0 {
0146         vmmc-supply = <&reg_vcc3v3>;
0147         bus-width = <4>;
0148         cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH01 */
0149         status = "okay";
0150 };
0151 
0152 &ohci0 {
0153         status = "okay";
0154 };
0155 
0156 &ohci1 {
0157         status = "okay";
0158 };
0159 
0160 &otg_sram {
0161         status = "okay";
0162 };
0163 
0164 &pio {
0165         vcc-pb-supply = <&reg_vcc3v3>;
0166         vcc-pf-supply = <&reg_vcc3v3>;
0167         vcc-ph-supply = <&reg_vcc3v3>;
0168 };
0169 
0170 &pwm {
0171         pinctrl-names = "default";
0172         pinctrl-0 = <&pwm0_pin>;
0173         status = "okay";
0174 };
0175 
0176 &reg_dcdc2 {
0177         regulator-always-on;
0178         regulator-min-microvolt = <1000000>;
0179         regulator-max-microvolt = <1400000>;
0180         regulator-name = "vdd-cpu";
0181 };
0182 
0183 &reg_dcdc3 {
0184         regulator-always-on;
0185         regulator-min-microvolt = <1250000>;
0186         regulator-max-microvolt = <1250000>;
0187         regulator-name = "vdd-int-dll";
0188 };
0189 
0190 &reg_ldo1 {
0191         regulator-name = "vdd-rtc";
0192 };
0193 
0194 &reg_ldo2 {
0195         regulator-always-on;
0196         regulator-min-microvolt = <3000000>;
0197         regulator-max-microvolt = <3000000>;
0198         regulator-name = "avcc";
0199 };
0200 
0201 &reg_usb0_vbus {
0202         status = "okay";
0203 };
0204 
0205 &reg_usb1_vbus {
0206         status = "okay";
0207 };
0208 
0209 &reg_usb2_vbus {
0210         status = "okay";
0211 };
0212 
0213 &tcon0_out {
0214         tcon0_out_panel: endpoint@0 {
0215                 reg = <0>;
0216                 remote-endpoint = <&panel_input>;
0217         };
0218 };
0219 
0220 &uart0 {
0221         pinctrl-names = "default";
0222         pinctrl-0 = <&uart0_pb_pins>;
0223         status = "okay";
0224 };
0225 
0226 &usb_otg {
0227         dr_mode = "otg";
0228         status = "okay";
0229 };
0230 
0231 &usb_power_supply {
0232         status = "okay";
0233 };
0234 
0235 &usbphy {
0236         usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
0237         usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
0238         usb0_vbus-supply = <&reg_usb0_vbus>;
0239         usb1_vbus-supply = <&reg_usb1_vbus>;
0240         usb2_vbus-supply = <&reg_usb2_vbus>;
0241         status = "okay";
0242 };