0001 // SPDX-License-Identifier: GPL-2.0
0002 /dts-v1/;
0003
0004 #include "jz4725b.dtsi"
0005
0006 #include <dt-bindings/gpio/gpio.h>
0007 #include <dt-bindings/iio/adc/ingenic,adc.h>
0008 #include <dt-bindings/input/linux-event-codes.h>
0009
0010 / {
0011 compatible = "ylm,rs90", "ingenic,jz4725b";
0012 model = "RS-90";
0013
0014 memory {
0015 device_type = "memory";
0016 reg = <0x0 0x2000000>;
0017 };
0018
0019 reserved-memory {
0020 #address-cells = <1>;
0021 #size-cells = <1>;
0022 ranges;
0023
0024 vmem: video-memory@1f00000 {
0025 compatible = "shared-dma-pool";
0026 reg = <0x1f00000 0x100000>;
0027 reusable;
0028 };
0029 };
0030
0031 vcc: regulator {
0032 compatible = "regulator-fixed";
0033
0034 regulator-name = "vcc";
0035 regulaor-min-microvolt = <3300000>;
0036 regulaor-max-microvolt = <3300000>;
0037 regulator-always-on;
0038 };
0039
0040 backlight: backlight {
0041 compatible = "pwm-backlight";
0042 pwms = <&pwm 3 40000 0>;
0043
0044 brightness-levels = <0 16 32 48 64 80 112 144 192 255>;
0045 default-brightness-level = <8>;
0046
0047 pinctrl-names = "default";
0048 pinctrl-0 = <&pins_pwm3>;
0049
0050 power-supply = <&vcc>;
0051 };
0052
0053 keys@0 {
0054 compatible = "gpio-keys";
0055
0056 key-0 {
0057 label = "D-pad up";
0058 linux,code = <KEY_UP>;
0059 gpios = <&gpc 10 GPIO_ACTIVE_LOW>;
0060 };
0061
0062 key-1 {
0063 label = "D-pad down";
0064 linux,code = <KEY_DOWN>;
0065 gpios = <&gpc 11 GPIO_ACTIVE_LOW>;
0066 };
0067
0068 key-2 {
0069 label = "D-pad left";
0070 linux,code = <KEY_LEFT>;
0071 gpios = <&gpb 31 GPIO_ACTIVE_LOW>;
0072 };
0073
0074 key-3 {
0075 label = "D-pad right";
0076 linux,code = <KEY_RIGHT>;
0077 gpios = <&gpd 21 GPIO_ACTIVE_LOW>;
0078 };
0079
0080 key-4 {
0081 label = "Button A";
0082 linux,code = <KEY_LEFTCTRL>;
0083 gpios = <&gpc 31 GPIO_ACTIVE_LOW>;
0084 };
0085
0086 key-5 {
0087 label = "Button B";
0088 linux,code = <KEY_LEFTALT>;
0089 gpios = <&gpc 30 GPIO_ACTIVE_LOW>;
0090 };
0091
0092 key-6 {
0093 label = "Right shoulder button";
0094 linux,code = <KEY_BACKSPACE>;
0095 gpios = <&gpc 12 GPIO_ACTIVE_LOW>;
0096 debounce-interval = <10>;
0097 };
0098
0099 key-7 {
0100 label = "Start button";
0101 linux,code = <KEY_ENTER>;
0102 gpios = <&gpd 17 GPIO_ACTIVE_LOW>;
0103 };
0104 };
0105
0106 keys@1 {
0107 compatible = "adc-keys";
0108 io-channels = <&adc INGENIC_ADC_AUX>;
0109 io-channel-names = "buttons";
0110 keyup-threshold-microvolt = <1400000>;
0111 poll-interval = <30>;
0112
0113 key@0 {
0114 label = "Left shoulder button";
0115 linux,code = <KEY_TAB>;
0116 press-threshold-microvolt = <800000>;
0117 };
0118
0119 key@1 {
0120 label = "Select button";
0121 linux,code = <KEY_ESC>;
0122 press-threshold-microvolt = <1100000>;
0123 };
0124 };
0125
0126 amp: analog-amplifier {
0127 compatible = "simple-audio-amplifier";
0128 enable-gpios = <&gpc 15 GPIO_ACTIVE_HIGH>;
0129
0130 VCC-supply = <&vcc>;
0131 };
0132
0133 sound {
0134 compatible = "simple-audio-card";
0135
0136 simple-audio-card,name = "rs90-audio";
0137 simple-audio-card,format = "i2s";
0138
0139 simple-audio-card,widgets =
0140 "Speaker", "Speaker",
0141 "Headphone", "Headphones";
0142 simple-audio-card,routing =
0143 "INL", "LHPOUT",
0144 "INR", "RHPOUT",
0145 "Headphones", "LHPOUT",
0146 "Headphones", "RHPOUT",
0147 "Speaker", "OUTL",
0148 "Speaker", "OUTR";
0149 simple-audio-card,pin-switches = "Speaker";
0150
0151 simple-audio-card,hp-det-gpio = <&gpd 16 GPIO_ACTIVE_LOW>;
0152 simple-audio-card,aux-devs = <&>;
0153
0154 simple-audio-card,bitclock-master = <&dai_codec>;
0155 simple-audio-card,frame-master = <&dai_codec>;
0156
0157 dai_cpu: simple-audio-card,cpu {
0158 sound-dai = <&aic>;
0159 };
0160
0161 dai_codec: simple-audio-card,codec {
0162 sound-dai = <&codec>;
0163 };
0164
0165 };
0166
0167 usb_phy: usb-phy {
0168 compatible = "usb-nop-xceiv";
0169 #phy-cells = <0>;
0170
0171 clocks = <&cgu JZ4725B_CLK_UDC_PHY>;
0172 clock-names = "main_clk";
0173 vcc-supply = <&vcc>;
0174 };
0175
0176 panel {
0177 compatible = "sharp,ls020b1dd01d";
0178
0179 backlight = <&backlight>;
0180 power-supply = <&vcc>;
0181
0182 port {
0183 panel_input: endpoint {
0184 remote-endpoint = <&panel_output>;
0185 };
0186 };
0187 };
0188 };
0189
0190 &ext {
0191 clock-frequency = <12000000>;
0192 };
0193
0194 &rtc_dev {
0195 system-power-controller;
0196 };
0197
0198 &udc {
0199 phys = <&usb_phy>;
0200 };
0201
0202 &pinctrl {
0203 pins_mmc1: mmc1 {
0204 function = "mmc1";
0205 groups = "mmc1-1bit";
0206 };
0207
0208 pins_nemc: nemc {
0209 function = "nand";
0210 groups = "nand-cs1", "nand-cle-ale", "nand-fre-fwe";
0211 };
0212
0213 pins_pwm3: pwm3 {
0214 function = "pwm3";
0215 groups = "pwm3";
0216 bias-disable;
0217 };
0218
0219 pins_lcd: lcd {
0220 function = "lcd";
0221 groups = "lcd-8bit", "lcd-16bit", "lcd-special";
0222 };
0223 };
0224
0225 &mmc0 {
0226 status = "disabled";
0227 };
0228
0229 &mmc1 {
0230 bus-width = <1>;
0231 max-frequency = <48000000>;
0232
0233 pinctrl-names = "default";
0234 pinctrl-0 = <&pins_mmc1>;
0235
0236 cd-gpios = <&gpc 20 GPIO_ACTIVE_LOW>;
0237 };
0238
0239 &uart {
0240 /*
0241 * The pins for RX/TX are used for the right shoulder button and
0242 * backlight PWM.
0243 */
0244 status = "disabled";
0245 };
0246
0247 &nemc {
0248 nandc: nand-controller@1 {
0249 compatible = "ingenic,jz4725b-nand";
0250 reg = <1 0 0x4000000>;
0251
0252 #address-cells = <1>;
0253 #size-cells = <0>;
0254
0255 ecc-engine = <&bch>;
0256
0257 ingenic,nemc-tAS = <10>;
0258 ingenic,nemc-tAH = <5>;
0259 ingenic,nemc-tBP = <10>;
0260 ingenic,nemc-tAW = <15>;
0261 ingenic,nemc-tSTRV = <100>;
0262
0263 pinctrl-names = "default";
0264 pinctrl-0 = <&pins_nemc>;
0265
0266 rb-gpios = <&gpc 27 GPIO_ACTIVE_HIGH>;
0267
0268 nand@1 {
0269 reg = <1>;
0270
0271 nand-ecc-step-size = <512>;
0272 nand-ecc-strength = <8>;
0273 nand-ecc-mode = "hw";
0274 nand-is-boot-medium;
0275 nand-on-flash-bbt;
0276
0277 partitions {
0278 compatible = "fixed-partitions";
0279 #address-cells = <1>;
0280 #size-cells = <1>;
0281
0282 partition@0 {
0283 label = "bootloader";
0284 reg = <0x0 0x20000>;
0285 };
0286
0287 partition@20000 {
0288 label = "system";
0289 reg = <0x20000 0x0>;
0290 };
0291 };
0292 };
0293 };
0294 };
0295
0296 &cgu {
0297 /* Use 32kHz oscillator as the parent of the RTC clock */
0298 assigned-clocks = <&cgu JZ4725B_CLK_RTC>;
0299 assigned-clock-parents = <&cgu JZ4725B_CLK_OSC32K>;
0300 };
0301
0302 &tcu {
0303 /*
0304 * 750 kHz for the system timer and clocksource, and use RTC as the
0305 * parent for the watchdog clock.
0306 */
0307 assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>, <&tcu TCU_CLK_WDT>;
0308 assigned-clock-parents = <0>, <0>, <&cgu JZ4725B_CLK_RTC>;
0309 assigned-clock-rates = <750000>, <750000>;
0310 };
0311
0312 &lcd {
0313 memory-region = <&vmem>;
0314
0315 pinctrl-names = "default";
0316 pinctrl-0 = <&pins_lcd>;
0317 };
0318
0319 &lcd_ports {
0320 port@0 {
0321 reg = <0>;
0322
0323 panel_output: endpoint {
0324 remote-endpoint = <&panel_input>;
0325 };
0326 };
0327 };