0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003 * TOPEET's Exynos4412 based itop board device tree source
0004 *
0005 * Copyright (c) 2016 SUMOMO Computer Association
0006 * https://www.sumomo.mobi
0007 * Randy Li <ayaka@soulik.info>
0008 *
0009 * Device tree source file for TOPEET iTop Exynos 4412 core board
0010 * which is based on Samsung's Exynos4412 SoC.
0011 */
0012
0013 /dts-v1/;
0014 #include <dt-bindings/leds/common.h>
0015 #include <dt-bindings/pwm/pwm.h>
0016 #include <dt-bindings/sound/samsung-i2s.h>
0017 #include "exynos4412-itop-scp-core.dtsi"
0018
0019 / {
0020 model = "TOPEET iTop 4412 Elite board based on Exynos4412";
0021 compatible = "topeet,itop4412-elite", "samsung,exynos4412", "samsung,exynos4";
0022
0023 chosen {
0024 bootargs = "root=/dev/mmcblk0p2 rw rootfstype=ext4 rootdelay=1 rootwait";
0025 stdout-path = "serial2:115200n8";
0026 };
0027
0028 leds {
0029 compatible = "gpio-leds";
0030
0031 led2 {
0032 function = LED_FUNCTION_HEARTBEAT;
0033 color = <LED_COLOR_ID_RED>;
0034 gpios = <&gpx1 0 GPIO_ACTIVE_HIGH>;
0035 default-state = "off";
0036 linux,default-trigger = "heartbeat";
0037 };
0038
0039 led3 {
0040 label = "red:user";
0041 color = <LED_COLOR_ID_RED>;
0042 gpios = <&gpk1 1 GPIO_ACTIVE_HIGH>;
0043 default-state = "off";
0044 };
0045 };
0046
0047 gpio-keys {
0048 compatible = "gpio-keys";
0049
0050 key-home {
0051 label = "GPIO Key Home";
0052 linux,code = <KEY_HOME>;
0053 gpios = <&gpx1 1 GPIO_ACTIVE_LOW>;
0054 };
0055
0056 key-back {
0057 label = "GPIO Key Back";
0058 linux,code = <KEY_BACK>;
0059 gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
0060 };
0061
0062 key-sleep {
0063 label = "GPIO Key Sleep";
0064 linux,code = <KEY_POWER>;
0065 gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
0066 };
0067
0068 key-vol-up {
0069 label = "GPIO Key Vol+";
0070 linux,code = <KEY_UP>;
0071 gpios = <&gpx2 1 GPIO_ACTIVE_LOW>;
0072 };
0073
0074 key-vol-down {
0075 label = "GPIO Key Vol-";
0076 linux,code = <KEY_DOWN>;
0077 gpios = <&gpx2 0 GPIO_ACTIVE_LOW>;
0078 };
0079 };
0080
0081 sound {
0082 compatible = "simple-audio-card";
0083 simple-audio-card,name = "wm-sound";
0084
0085 simple-audio-card,format = "i2s";
0086 simple-audio-card,bitclock-master = <&link0_codec>;
0087 simple-audio-card,frame-master = <&link0_codec>;
0088
0089 simple-audio-card,widgets =
0090 "Microphone", "Mic Jack",
0091 "Line", "Line In",
0092 "Line", "Line Out",
0093 "Speaker", "Speaker",
0094 "Headphone", "Headphone Jack";
0095 simple-audio-card,routing =
0096 "Headphone Jack", "HP_L",
0097 "Headphone Jack", "HP_R",
0098 "Speaker", "SPK_LP",
0099 "Speaker", "SPK_LN",
0100 "Speaker", "SPK_RP",
0101 "Speaker", "SPK_RN",
0102 "LINPUT1", "Mic Jack",
0103 "LINPUT3", "Mic Jack",
0104 "RINPUT1", "Mic Jack",
0105 "RINPUT2", "Mic Jack";
0106
0107 simple-audio-card,cpu {
0108 sound-dai = <&i2s0 0>;
0109 };
0110
0111 link0_codec: simple-audio-card,codec {
0112 sound-dai = <&codec>;
0113 clocks = <&i2s0 CLK_I2S_CDCLK>;
0114 system-clock-frequency = <11289600>;
0115 };
0116 };
0117
0118 beep {
0119 compatible = "pwm-beeper";
0120 pwms = <&pwm 0 4000000 PWM_POLARITY_INVERTED>;
0121 };
0122 };
0123
0124 &adc {
0125 vdd-supply = <&ldo3_reg>;
0126 status = "okay";
0127 };
0128
0129 &camera {
0130 pinctrl-0 = <&cam_port_a_clk_active>;
0131 pinctrl-names = "default";
0132 status = "okay";
0133 assigned-clocks = <&clock CLK_MOUT_CAM0>;
0134 assigned-clock-parents = <&clock CLK_XUSBXTI>;
0135 };
0136
0137 &clock_audss {
0138 assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
0139 <&clock_audss EXYNOS_MOUT_I2S>,
0140 <&clock_audss EXYNOS_DOUT_SRP>,
0141 <&clock_audss EXYNOS_DOUT_AUD_BUS>;
0142 assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
0143 <&clock_audss EXYNOS_MOUT_AUDSS>;
0144 assigned-clock-rates = <0>, <0>, <112896000>, <11289600>;
0145 };
0146
0147 &ehci {
0148 status = "okay";
0149 /* In order to reset USB ethernet */
0150 samsung,vbus-gpio = <&gpc0 1 GPIO_ACTIVE_HIGH>;
0151
0152 phys = <&exynos_usbphy 1>, <&exynos_usbphy 3>;
0153 phy-names = "host", "hsic1";
0154 };
0155
0156 &exynos_usbphy {
0157 status = "okay";
0158 };
0159
0160 &fimc_0 {
0161 status = "okay";
0162 assigned-clocks = <&clock CLK_MOUT_FIMC0>,
0163 <&clock CLK_SCLK_FIMC0>;
0164 assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
0165 assigned-clock-rates = <0>, <176000000>;
0166 };
0167
0168 &hsotg {
0169 dr_mode = "peripheral";
0170 status = "okay";
0171 };
0172
0173 &i2c_4 {
0174 samsung,i2c-sda-delay = <100>;
0175 samsung,i2c-slave-addr = <0x10>;
0176 samsung,i2c-max-bus-freq = <100000>;
0177 pinctrl-0 = <&i2c4_bus>;
0178 pinctrl-names = "default";
0179 status = "okay";
0180
0181 codec: audio-codec@1a {
0182 compatible = "wlf,wm8960";
0183 reg = <0x1a>;
0184 clocks = <&pmu_system_controller 0>;
0185 clock-names = "MCLK1";
0186 wlf,shared-lrclk;
0187 #sound-dai-cells = <0>;
0188 };
0189 };
0190
0191 &i2s0 {
0192 pinctrl-0 = <&i2s0_bus>;
0193 pinctrl-names = "default";
0194 status = "okay";
0195 };
0196
0197 &pinctrl_1 {
0198 ether-reset-pins {
0199 samsung,pins = "gpc0-1";
0200 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
0201 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
0202 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
0203 };
0204 };
0205
0206 &pwm {
0207 status = "okay";
0208 pinctrl-0 = <&pwm0_out>;
0209 pinctrl-names = "default";
0210 samsung,pwm-outputs = <0>;
0211 };
0212
0213 &sdhci_2 {
0214 bus-width = <4>;
0215 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
0216 pinctrl-names = "default";
0217 cd-gpio = <&gpx0 7 GPIO_ACTIVE_LOW>;
0218 cap-sd-highspeed;
0219 vmmc-supply = <&ldo23_reg>;
0220 vqmmc-supply = <&ldo17_reg>;
0221 status = "okay";
0222 };
0223
0224 &serial_1 {
0225 status = "okay";
0226 };
0227
0228 &serial_2 {
0229 status = "okay";
0230 };