Skip to content

Commit d2bbcee

Browse files
committed
Init the state of 40 pin to gpio functions
Signed-off-by: yi-hsin_hung <yi-hsin_hung@asus.com> Change-Id: I7e23bea19e9bca492aceefc9fe87fdda431c5aa8 Signed-off-by: yi-hsin_hung <yi-hsin_hung@asus.com>
1 parent 7c72b14 commit d2bbcee

4 files changed

Lines changed: 73 additions & 6 deletions

File tree

arch/arm/boot/dts/rk3288-tinker-board.dts

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@
183183
regulator-name = "vcc18_dvp";
184184
regulator-min-microvolt = <1800000>;
185185
regulator-max-microvolt = <1800000>;
186-
gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
187186
enable-active-high;
188187
regulator-always-on;
189188
vin-supply = <&vcc_io>;
@@ -589,7 +588,7 @@
589588
};
590589

591590
&i2c1 {
592-
status = "okay";
591+
status = "disabled";
593592
clock-frequency = <400000>;
594593

595594
mpu6050@68 {
@@ -712,6 +711,45 @@
712711
};
713712
};
714713

714+
&spi0 {
715+
status = "disabled";
716+
max-freq = <50000000>;
717+
718+
spidev@0 {
719+
compatible = "rockchip,spi_tinker";
720+
reg = <0>;
721+
spi-max-frequency = <50000000>;
722+
spi-cpha = <1>;
723+
};
724+
725+
spidev@1 {
726+
compatible = "rockchip,spi_tinker";
727+
reg = <1>;
728+
spi-max-frequency = <50000000>;
729+
spi-cpha = <1>;
730+
};
731+
};
732+
733+
&spi2 {
734+
status = "disabled";
735+
max-freq = <50000000>;
736+
737+
spidev@0 {
738+
compatible = "rockchip,spi_tinker";
739+
reg = <0>;
740+
spi-max-frequency = <50000000>;
741+
spi-cpha = <1>;
742+
};
743+
744+
spidev@1 {
745+
compatible = "rockchip,spi_tinker";
746+
reg = <1>;
747+
spi-max-frequency = <50000000>;
748+
spi-cpha = <1>;
749+
};
750+
};
751+
752+
715753
&isp_mmu {
716754
status = "okay";
717755
};
@@ -799,6 +837,17 @@
799837
};
800838

801839
&pinctrl {
840+
pinctrl-names = "default";
841+
pinctrl-0 = <&gpio_init>;
842+
843+
gpio_init_config {
844+
gpio_init: gpio-init {
845+
rockchip,pins =
846+
<7 22 RK_FUNC_GPIO &pcfg_pull_none>,
847+
<7 23 RK_FUNC_GPIO &pcfg_pull_none>;
848+
};
849+
};
850+
802851
backlight {
803852
bl_en: bl-en {
804853
rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -821,4 +870,5 @@
821870
&fiq_debugger {
822871
rockchip,serial-id = <3>;
823872
pinctrl-0 = <&uart3_xfer>;
873+
status = "disabled";
824874
};

arch/arm/boot/dts/rk3288-tinker-board.dtsi

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280
};
281281

282282
&i2c4 {
283-
status = "okay";
283+
status = "disabled";
284284
clock-frequency = <400000>;
285285

286286
gsl3673@40 {
@@ -296,7 +296,7 @@
296296

297297
&i2s {
298298
#sound-dai-cells = <0>;
299-
status = "okay";
299+
status = "disabled";
300300
};
301301

302302
&io_domains {
@@ -350,10 +350,26 @@
350350
status = "okay";
351351
};
352352

353+
&uart1 {
354+
pinctrl-names = "default";
355+
pinctrl-0 = <&uart1_xfer>, <&uart1_cts>, <&uart1_rts>;
356+
status = "disabled";
357+
};
358+
353359
&uart2 {
354360
status = "disabled";
355361
};
356362

363+
&uart3 {
364+
status = "disabled";
365+
};
366+
367+
&uart4 {
368+
pinctrl-names = "default";
369+
pinctrl-0 = <&uart4_xfer>, <&uart4_cts>, <&uart4_rts>;
370+
status = "disabled";
371+
};
372+
357373
&vpu_service {
358374
status = "okay";
359375
};

arch/arm/boot/dts/rk3288.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@
440440
dma-names = "tx", "rx";
441441
interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
442442
pinctrl-names = "default";
443-
pinctrl-0 = <&spi0_clk &spi0_tx &spi0_rx &spi0_cs0>;
443+
pinctrl-0 = <&spi0_clk &spi0_tx &spi0_rx &spi0_cs0 &spi0_cs1>;
444444
reg = <0x0 0xff110000 0x0 0x1000>;
445445
#address-cells = <1>;
446446
#size-cells = <0>;
@@ -470,7 +470,7 @@
470470
dma-names = "tx", "rx";
471471
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
472472
pinctrl-names = "default";
473-
pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0>;
473+
pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0 &spi2_cs1>;
474474
reg = <0x0 0xff130000 0x0 0x1000>;
475475
#address-cells = <1>;
476476
#size-cells = <0>;

drivers/spi/spidev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ static const struct of_device_id spidev_dt_ids[] = {
696696
{ .compatible = "rohm,dh2228fv" },
697697
{ .compatible = "lineartechnology,ltc2488" },
698698
{ .compatible = "rockchip,spidev" },
699+
{ .compatible = "rockchip,spi_tinker" },
699700
{},
700701
};
701702
MODULE_DEVICE_TABLE(of, spidev_dt_ids);

0 commit comments

Comments
 (0)