/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/leds/common.h>


&gpio_led {

	working {
		gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
		linux,default-trigger = "timer";
	};

};

&{/} {

	i2c_aux_display: i2c-aux-display {

		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "spi-gpio";
		sck-gpios = <&gpio2 RK_PC3 GPIO_ACTIVE_HIGH>;
		mosi-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
		cs-gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
		num-chipselects = <1>;

		aux-display-controller@24 {

			compatible = "fdhisi,fd628";

			reg = <0x24>;
			spi-3wire;
			spi-lsb-first;
			spi-rx-delay-us = <1>;
			spi-max-frequency = <500000>;

			tm16xx,digits = [00 01 02 03];
                        tm16xx,segment-mapping = [03 01 02 06 04 05 00];

			#address-cells = <2>;
			#size-cells = <0>;

			led@4,3 {
				reg = <4 3>;
				function = LED_FUNCTION_POWER;
			};

			led@4,2 {
				reg = <4 2>;
				function = LED_FUNCTION_LAN;
				linux,default-trigger = "stmmac-0:00:link";
			};

			led@4,4 {
				reg = <4 4>;
				function = "colon";
			};

			led@4,5 {
				reg = <4 5>;
				function = "wlan-lo";
			};

			led@4,6 {
				reg = <4 6>;
				function = "wlan-hi";
				linux,default-trigger = "mmc1";
			};

		};
	};

};

&vcc_otg_vbus {
	gpio = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
};

&working_led {
	rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none_2ma>;
};

&io_domains {
	vccio6-supply = <&vcc_18>;
};

/*
 * Following section enables the sdio bus on sdmmc_ext controller
 */
&sdio {
	/delete-property/ mmc-pwrseq;
	status = "disabled";
};

&sdio_ext {
	mmc-pwrseq = <&sdio_pwrseq>;
	status = "okay";
};

&sdmmc_ext {
	status = "disabled";
};

&spdif {
	pinctrl-0 = <&spdifm1_tx>;
};

