diff --git a/patch/kernel/archive/rockchip64-6.12/dt/rk3328-mkspi.dts b/patch/kernel/archive/rockchip64-6.12/dt/rk3328-mkspi.dts index 450199ba06..12a1bfa7a8 100644 --- a/patch/kernel/archive/rockchip64-6.12/dt/rk3328-mkspi.dts +++ b/patch/kernel/archive/rockchip64-6.12/dt/rk3328-mkspi.dts @@ -10,8 +10,8 @@ #include "rk3328.dtsi" / { - model = "Firefly roc-rk3328-cc"; - compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328"; + model = "Makerbase MKS-PI"; + compatible = "mks,rk3328-mkspi", "rockchip,rk3328"; aliases { mmc0 = &sdmmc; @@ -78,21 +78,23 @@ vcc_sdio: sdmmcio-regulator { compatible = "regulator-gpio"; - gpios = <&grf_gpio 0 GPIO_ACTIVE_HIGH>; - states = <1800000 0x1>, - <3300000 0x0>; + gpios = <&gpio2 RK_PC4 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&sdio_vcc_pin>; + pinctrl-names = "default"; + states = <1800000 0x0>, + <3300000 0x1>; regulator-name = "vcc_sdio"; regulator-type = "voltage"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-always-on; - vin-supply = <&vcc_sys>; + vin-supply = <&vcc_io>; }; vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { compatible = "regulator-fixed"; enable-active-high; - gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; + gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&usb20_host_drv>; regulator-name = "vcc_host1_5v"; @@ -135,23 +137,20 @@ }; }; - ir-receiver { - compatible = "gpio-ir-receiver"; - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&ir_int>; - pinctrl-names = "default"; - }; - }; &analog_sound { - status = "okay"; + status = "disabled"; }; &codec { status = "okay"; }; +&gmac2phy { + status = "okay"; +}; + &dfi { status = "okay"; }; @@ -209,7 +208,7 @@ snps,txpbl = <0x4>; tx_delay = <0x24>; rx_delay = <0x18>; - status = "okay"; + status = "disabled"; }; &gpu { @@ -351,7 +350,7 @@ vccio1-supply = <&vcc_io>; vccio2-supply = <&vcc18_emmc>; vccio3-supply = <&vcc_sdio>; - vccio4-supply = <&vcc_18>; + vccio4-supply = <&vcc_io>; vccio5-supply = <&vcc_io>; vccio6-supply = <&vcc_io>; pmuio-supply = <&vcc_io>; @@ -359,23 +358,44 @@ &pinctrl { - ir { - ir_int: ir-int { - rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - pmic { pmic_int_l: pmic-int-l { - rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>; + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; }; }; usb2 { usb20_host_drv: usb20-host-drv { - rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; + rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + sd { + sdio_vcc_pin: sdio-vcc-pin { + rockchip,pins = <2 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + touchscreen { + pinctrl_tsc2046_pendown: pinctrl_tsc2046_pendown { + rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + pinctrl_tsc2046_cs: pinctrl_tsc2046_cs { + rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + lcd { + pinctrl_st7796_cs: pinctrl_st7796_cs { + rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + spi0_cs2 { + pinctrl_spi0_cs2: pinctrl_spi0_cs2 { + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; }; &sdmmc { @@ -424,10 +444,72 @@ status = "okay"; }; +&uart0 { + pinctrl-0 = <&uart0_xfer &uart0_cts>; + status = "okay"; +}; + &uart2 { status = "okay"; }; +&spi0 { + max-freq = <48000000>; + cs-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>,<&gpio3 RK_PA7 GPIO_ACTIVE_LOW>,<&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + pinctrl-0 = <&spi0m2_clk &spi0m2_tx &spi0m2_rx>; + status = "okay"; + + spi_for_lcd@0 { + compatible ="ilitek,st7796"; + pinctrl-names ="default"; + pinctrl-0 = <&pinctrl_st7796_cs>; + reg = <0>; + spi-max-frequency = <24000000>; + bgr; + fps = <20>; + rotate = <270>; + buswidth = <8>; + dc-gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>; /* gpio3 A6 */ + reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>; /* gpio3 A4 */ + led-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; /* gpio3 A5 */ + status = "okay"; + }; + + spi_for_touch@1 { + reg = <1>; + compatible = "ti,tsc2046"; + pinctrl-names ="default"; + pinctrl-0 = <&pinctrl_tsc2046_pendown &pinctrl_tsc2046_cs>; + ti,x-max = /bits/ 16 <3776>; + ti,x-min = /bits/ 16 <164>; + ti,y-min = /bits/ 16 <201>; + ti,y-max = /bits/ 16 <3919>; + ti,x-plate-ohms = /bits/ 16 <40>; + ti,pressure-max = /bits/ 16 <255>; + //touchscreen-fuzz-x = <16>; + //touchscreen-fuzz-y = <16>; + //touchscreen-fuzz-pressure = <10>; + ti,swap-xy = <1>; + touchscreen-inverted-y = <1>; + interrupt-parent = <&gpio1>; + interrupts = ; + spi-max-frequency = <2000000>; + pendown-gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>; + vcc-supply = <&vcc_io>; + wakeup-source; + status = "okay"; + }; + + spi_for_cs2@2 { + reg = <2>; + compatible ="armbian,spi-dev"; + pinctrl-names ="default"; + pinctrl-0 = <&pinctrl_spi0_cs2>; + spi-max-frequency = <5000000>; + status = "okay"; + }; +}; + &usb20_otg { dr_mode = "host"; status = "okay"; diff --git a/patch/kernel/archive/rockchip64-6.6/dt/rk3328-mkspi.dts b/patch/kernel/archive/rockchip64-6.6/dt/rk3328-mkspi.dts index 450199ba06..12a1bfa7a8 100644 --- a/patch/kernel/archive/rockchip64-6.6/dt/rk3328-mkspi.dts +++ b/patch/kernel/archive/rockchip64-6.6/dt/rk3328-mkspi.dts @@ -10,8 +10,8 @@ #include "rk3328.dtsi" / { - model = "Firefly roc-rk3328-cc"; - compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328"; + model = "Makerbase MKS-PI"; + compatible = "mks,rk3328-mkspi", "rockchip,rk3328"; aliases { mmc0 = &sdmmc; @@ -78,21 +78,23 @@ vcc_sdio: sdmmcio-regulator { compatible = "regulator-gpio"; - gpios = <&grf_gpio 0 GPIO_ACTIVE_HIGH>; - states = <1800000 0x1>, - <3300000 0x0>; + gpios = <&gpio2 RK_PC4 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&sdio_vcc_pin>; + pinctrl-names = "default"; + states = <1800000 0x0>, + <3300000 0x1>; regulator-name = "vcc_sdio"; regulator-type = "voltage"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-always-on; - vin-supply = <&vcc_sys>; + vin-supply = <&vcc_io>; }; vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { compatible = "regulator-fixed"; enable-active-high; - gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; + gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&usb20_host_drv>; regulator-name = "vcc_host1_5v"; @@ -135,23 +137,20 @@ }; }; - ir-receiver { - compatible = "gpio-ir-receiver"; - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&ir_int>; - pinctrl-names = "default"; - }; - }; &analog_sound { - status = "okay"; + status = "disabled"; }; &codec { status = "okay"; }; +&gmac2phy { + status = "okay"; +}; + &dfi { status = "okay"; }; @@ -209,7 +208,7 @@ snps,txpbl = <0x4>; tx_delay = <0x24>; rx_delay = <0x18>; - status = "okay"; + status = "disabled"; }; &gpu { @@ -351,7 +350,7 @@ vccio1-supply = <&vcc_io>; vccio2-supply = <&vcc18_emmc>; vccio3-supply = <&vcc_sdio>; - vccio4-supply = <&vcc_18>; + vccio4-supply = <&vcc_io>; vccio5-supply = <&vcc_io>; vccio6-supply = <&vcc_io>; pmuio-supply = <&vcc_io>; @@ -359,23 +358,44 @@ &pinctrl { - ir { - ir_int: ir-int { - rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - pmic { pmic_int_l: pmic-int-l { - rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>; + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; }; }; usb2 { usb20_host_drv: usb20-host-drv { - rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; + rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + sd { + sdio_vcc_pin: sdio-vcc-pin { + rockchip,pins = <2 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + touchscreen { + pinctrl_tsc2046_pendown: pinctrl_tsc2046_pendown { + rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + pinctrl_tsc2046_cs: pinctrl_tsc2046_cs { + rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + lcd { + pinctrl_st7796_cs: pinctrl_st7796_cs { + rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + spi0_cs2 { + pinctrl_spi0_cs2: pinctrl_spi0_cs2 { + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; }; &sdmmc { @@ -424,10 +444,72 @@ status = "okay"; }; +&uart0 { + pinctrl-0 = <&uart0_xfer &uart0_cts>; + status = "okay"; +}; + &uart2 { status = "okay"; }; +&spi0 { + max-freq = <48000000>; + cs-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>,<&gpio3 RK_PA7 GPIO_ACTIVE_LOW>,<&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + pinctrl-0 = <&spi0m2_clk &spi0m2_tx &spi0m2_rx>; + status = "okay"; + + spi_for_lcd@0 { + compatible ="ilitek,st7796"; + pinctrl-names ="default"; + pinctrl-0 = <&pinctrl_st7796_cs>; + reg = <0>; + spi-max-frequency = <24000000>; + bgr; + fps = <20>; + rotate = <270>; + buswidth = <8>; + dc-gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>; /* gpio3 A6 */ + reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>; /* gpio3 A4 */ + led-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; /* gpio3 A5 */ + status = "okay"; + }; + + spi_for_touch@1 { + reg = <1>; + compatible = "ti,tsc2046"; + pinctrl-names ="default"; + pinctrl-0 = <&pinctrl_tsc2046_pendown &pinctrl_tsc2046_cs>; + ti,x-max = /bits/ 16 <3776>; + ti,x-min = /bits/ 16 <164>; + ti,y-min = /bits/ 16 <201>; + ti,y-max = /bits/ 16 <3919>; + ti,x-plate-ohms = /bits/ 16 <40>; + ti,pressure-max = /bits/ 16 <255>; + //touchscreen-fuzz-x = <16>; + //touchscreen-fuzz-y = <16>; + //touchscreen-fuzz-pressure = <10>; + ti,swap-xy = <1>; + touchscreen-inverted-y = <1>; + interrupt-parent = <&gpio1>; + interrupts = ; + spi-max-frequency = <2000000>; + pendown-gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>; + vcc-supply = <&vcc_io>; + wakeup-source; + status = "okay"; + }; + + spi_for_cs2@2 { + reg = <2>; + compatible ="armbian,spi-dev"; + pinctrl-names ="default"; + pinctrl-0 = <&pinctrl_spi0_cs2>; + spi-max-frequency = <5000000>; + status = "okay"; + }; +}; + &usb20_otg { dr_mode = "host"; status = "okay"; diff --git a/patch/kernel/archive/rockchip64-6.9/dt/rk3328-mkspi.dts b/patch/kernel/archive/rockchip64-6.9/dt/rk3328-mkspi.dts index 450199ba06..12a1bfa7a8 100644 --- a/patch/kernel/archive/rockchip64-6.9/dt/rk3328-mkspi.dts +++ b/patch/kernel/archive/rockchip64-6.9/dt/rk3328-mkspi.dts @@ -10,8 +10,8 @@ #include "rk3328.dtsi" / { - model = "Firefly roc-rk3328-cc"; - compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328"; + model = "Makerbase MKS-PI"; + compatible = "mks,rk3328-mkspi", "rockchip,rk3328"; aliases { mmc0 = &sdmmc; @@ -78,21 +78,23 @@ vcc_sdio: sdmmcio-regulator { compatible = "regulator-gpio"; - gpios = <&grf_gpio 0 GPIO_ACTIVE_HIGH>; - states = <1800000 0x1>, - <3300000 0x0>; + gpios = <&gpio2 RK_PC4 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&sdio_vcc_pin>; + pinctrl-names = "default"; + states = <1800000 0x0>, + <3300000 0x1>; regulator-name = "vcc_sdio"; regulator-type = "voltage"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-always-on; - vin-supply = <&vcc_sys>; + vin-supply = <&vcc_io>; }; vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { compatible = "regulator-fixed"; enable-active-high; - gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; + gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&usb20_host_drv>; regulator-name = "vcc_host1_5v"; @@ -135,23 +137,20 @@ }; }; - ir-receiver { - compatible = "gpio-ir-receiver"; - gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; - pinctrl-0 = <&ir_int>; - pinctrl-names = "default"; - }; - }; &analog_sound { - status = "okay"; + status = "disabled"; }; &codec { status = "okay"; }; +&gmac2phy { + status = "okay"; +}; + &dfi { status = "okay"; }; @@ -209,7 +208,7 @@ snps,txpbl = <0x4>; tx_delay = <0x24>; rx_delay = <0x18>; - status = "okay"; + status = "disabled"; }; &gpu { @@ -351,7 +350,7 @@ vccio1-supply = <&vcc_io>; vccio2-supply = <&vcc18_emmc>; vccio3-supply = <&vcc_sdio>; - vccio4-supply = <&vcc_18>; + vccio4-supply = <&vcc_io>; vccio5-supply = <&vcc_io>; vccio6-supply = <&vcc_io>; pmuio-supply = <&vcc_io>; @@ -359,23 +358,44 @@ &pinctrl { - ir { - ir_int: ir-int { - rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - pmic { pmic_int_l: pmic-int-l { - rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>; + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; }; }; usb2 { usb20_host_drv: usb20-host-drv { - rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; + rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + sd { + sdio_vcc_pin: sdio-vcc-pin { + rockchip,pins = <2 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + touchscreen { + pinctrl_tsc2046_pendown: pinctrl_tsc2046_pendown { + rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + pinctrl_tsc2046_cs: pinctrl_tsc2046_cs { + rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + lcd { + pinctrl_st7796_cs: pinctrl_st7796_cs { + rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + spi0_cs2 { + pinctrl_spi0_cs2: pinctrl_spi0_cs2 { + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; }; &sdmmc { @@ -424,10 +444,72 @@ status = "okay"; }; +&uart0 { + pinctrl-0 = <&uart0_xfer &uart0_cts>; + status = "okay"; +}; + &uart2 { status = "okay"; }; +&spi0 { + max-freq = <48000000>; + cs-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>,<&gpio3 RK_PA7 GPIO_ACTIVE_LOW>,<&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + pinctrl-0 = <&spi0m2_clk &spi0m2_tx &spi0m2_rx>; + status = "okay"; + + spi_for_lcd@0 { + compatible ="ilitek,st7796"; + pinctrl-names ="default"; + pinctrl-0 = <&pinctrl_st7796_cs>; + reg = <0>; + spi-max-frequency = <24000000>; + bgr; + fps = <20>; + rotate = <270>; + buswidth = <8>; + dc-gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>; /* gpio3 A6 */ + reset-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>; /* gpio3 A4 */ + led-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; /* gpio3 A5 */ + status = "okay"; + }; + + spi_for_touch@1 { + reg = <1>; + compatible = "ti,tsc2046"; + pinctrl-names ="default"; + pinctrl-0 = <&pinctrl_tsc2046_pendown &pinctrl_tsc2046_cs>; + ti,x-max = /bits/ 16 <3776>; + ti,x-min = /bits/ 16 <164>; + ti,y-min = /bits/ 16 <201>; + ti,y-max = /bits/ 16 <3919>; + ti,x-plate-ohms = /bits/ 16 <40>; + ti,pressure-max = /bits/ 16 <255>; + //touchscreen-fuzz-x = <16>; + //touchscreen-fuzz-y = <16>; + //touchscreen-fuzz-pressure = <10>; + ti,swap-xy = <1>; + touchscreen-inverted-y = <1>; + interrupt-parent = <&gpio1>; + interrupts = ; + spi-max-frequency = <2000000>; + pendown-gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>; + vcc-supply = <&vcc_io>; + wakeup-source; + status = "okay"; + }; + + spi_for_cs2@2 { + reg = <2>; + compatible ="armbian,spi-dev"; + pinctrl-names ="default"; + pinctrl-0 = <&pinctrl_spi0_cs2>; + spi-max-frequency = <5000000>; + status = "okay"; + }; +}; + &usb20_otg { dr_mode = "host"; status = "okay";