// SPDX-License-Identifier: GPL-2.0 /dts-v1/; #include "jz4740.dtsi" #include #include #include #include #define KEY_QI_QI KEY_F13 #define KEY_QI_UPRED KEY_RIGHTALT #define KEY_QI_VOLUP KEY_VOLUMEUP #define KEY_QI_VOLDOWN KEY_VOLUMEDOWN #define KEY_QI_FN KEY_LEFTCTRL / { compatible = "qi,lb60", "ingenic,jz4740"; model = "Ben Nanonote"; memory { device_type = "memory"; reg = <0x0 0x2000000>; }; chosen { stdout-path = &uart0; }; vcc: regulator-0 { compatible = "regulator-fixed"; regulator-name = "vcc"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; }; mmc_power: regulator-1 { compatible = "regulator-fixed"; regulator-name = "mmc_vcc"; gpio = <&gpd 2 0>; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; amp_supply: regulator-2 { compatible = "regulator-fixed"; regulator-name = "amp_supply"; gpio = <&gpd 4 0>; enable-active-high; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; amp: analog-amplifier { compatible = "simple-audio-amplifier"; enable-gpios = <&gpb 29 GPIO_ACTIVE_HIGH>; VCC-supply = <&_supply>; }; sound { compatible = "simple-audio-card"; simple-audio-card,name = "QI LB60"; simple-audio-card,format = "i2s"; simple-audio-card,widgets = "Speaker", "Speaker", "Microphone", "Mic"; simple-audio-card,routing = "MIC", "Mic", "Speaker", "OUTL", "Speaker", "OUTR", "INL", "LOUT", "INR", "ROUT"; simple-audio-card,aux-devs = <&>; simple-audio-card,bitclock-master = <&dai_codec>; simple-audio-card,frame-master = <&dai_codec>; dai_cpu: simple-audio-card,cpu { sound-dai = <&aic>; }; dai_codec: simple-audio-card,codec { sound-dai = <&codec>; }; }; keys { compatible = "gpio-keys"; key { label = "Power"; wakeup-source; linux,code = ; gpios = <&gpd 29 GPIO_ACTIVE_LOW>; }; }; keyboard { compatible = "gpio-matrix-keypad"; col-scan-delay-us = <10>; debounce-delay-ms = <10>; wakeup-source; row-gpios = <&gpd 18 0>, <&gpd 19 0>, <&gpd 20 0>, <&gpd 21 0>, <&gpd 22 0>, <&gpd 23 0>, <&gpd 24 0>, <&gpd 26 0>; col-gpios = <&gpc 10 0>, <&gpc 11 0>, <&gpc 12 0>, <&gpc 13 0>, <&gpc 14 0>, <&gpc 15 0>, <&gpc 16 0>, <&gpc 17 0>; gpio-activelow; linux,keymap = , /* S2 */ , /* S3 */ , /* S4 */ , /* S5 */ , /* S6 */ , /* S7 */ , /* S8 */ , /* S10 */ , /* S11 */ , /* S12 */ , /* S13 */ , /* S14 */ , /* S15 */ , /* S16 */ , /* S17 */ , /* S18 */ , /* S19 */ , /* S20 */ , /* S21 */ , /* S22 */ , /* S23 */ , /* S24 */ , /* S25 */ , /* S26 */ , /* S27 */ , /* S28 */ , /* S29 */ , /* S30 */ , /* S31 */ , /* S32 */ , /* S33 */ , /* S34 */ , /* S35 */ , /* S36 */ , /* S37 */ , /* S38 */ , /* S39 */ , /* S40 */ , /* S41 */ , /* S42 */ , /* S43 */ , /* S44 */ , /* S45 */ , /* S46 */ , /* S47 */ , /* S48 */ , /* S49 */ , /* S50 */ , /* S51 */ ,/* S52 */ , /* S53 */ , /* S54 */ , /* S55 */ , /* S56 */ , /* S57 */ , /* S58 */ , /* S59 */ ; /* S60 */ }; spi { compatible = "spi-gpio"; #address-cells = <1>; #size-cells = <0>; sck-gpios = <&gpc 23 GPIO_ACTIVE_HIGH>; mosi-gpios = <&gpc 22 GPIO_ACTIVE_HIGH>; cs-gpios = <&gpc 21 GPIO_ACTIVE_LOW>; num-chipselects = <1>; }; usb_charger: charger { compatible = "gpio-charger"; charger-type = "usb-sdp"; gpios = <&gpd 28 GPIO_ACTIVE_LOW>; status-gpios = <&gpc 27 GPIO_ACTIVE_LOW>; }; simple_battery: battery { compatible = "simple-battery"; voltage-min-design-microvolt = <3600000>; voltage-max-design-microvolt = <4200000>; }; pmu { compatible = "ingenic,jz4740-battery"; io-channels = <&adc INGENIC_ADC_BATTERY>; io-channel-names = "battery"; power-supplies = <&usb_charger>; monitored-battery = <&simple_battery>; }; hwmon { compatible = "iio-hwmon"; io-channels = <&adc INGENIC_ADC_AUX>; }; panel: panel { compatible = "giantplus,gpm940b0"; power-supply = <&vcc>; port { panel_input: endpoint { remote-endpoint = <&panel_output>; }; }; }; usb_phy: usb-phy { compatible = "usb-nop-xceiv"; #phy-cells = <0>; vcc-supply = <&vcc>; }; }; &ext { clock-frequency = <12000000>; }; &rtc_dev { system-power-controller; }; &uart0 { pinctrl-names = "default"; pinctrl-0 = <&pins_uart0>; }; &uart1 { status = "disabled"; }; &nemc { nandc: nand-controller@1 { compatible = "ingenic,jz4740-nand"; reg = <1 0 0x4000000>; #address-cells = <1>; #size-cells = <0>; ecc-engine = <&ecc>; pinctrl-names = "default"; pinctrl-0 = <&pins_nemc>; rb-gpios = <&gpc 30 GPIO_ACTIVE_HIGH>; nand@1 { reg = <1>; nand-ecc-step-size = <512>; nand-ecc-strength = <4>; nand-ecc-mode = "hw"; nand-is-boot-medium; nand-on-flash-bbt; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "boot"; reg = <0x0 0x400000>; }; partition@400000 { label = "kernel"; reg = <0x400000 0x400000>; }; partition@800000 { label = "rootfs"; reg = <0x800000 0x0>; }; }; }; }; }; &lcd { pinctrl-names = "default"; pinctrl-0 = <&pins_lcd>; port { panel_output: endpoint { remote-endpoint = <&panel_input>; }; }; }; &udc { phys = <&usb_phy>; }; &pinctrl { pins_lcd: lcd { function = "lcd"; groups = "lcd-8bit"; }; pins_nemc: nemc { function = "nand"; groups = "nand-fre-fwe", "nand-cs1"; }; pins_uart0: uart0 { function = "uart0"; groups = "uart0-data"; bias-disable; }; pins_mmc: mmc { mmc { function = "mmc"; groups = "mmc-1bit", "mmc-4bit"; bias-disable; }; mmc-gpios { pins = "PD0", "PD2"; bias-disable; }; }; }; &mmc { bus-width = <4>; max-frequency = <24000000>; cd-gpios = <&gpd 0 GPIO_ACTIVE_HIGH>; vmmc-supply = <&mmc_power>; pinctrl-names = "default"; pinctrl-0 = <&pins_mmc>; }; &tcu { /* 750 kHz for the system timer and clocksource */ assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>; assigned-clock-rates = <750000>, <750000>; };