Skip to content

Commit

Permalink
ayufan: dts: pinebook-pro: support v2
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Jun 5, 2019
1 parent e2de533 commit a6ade94
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions arch/arm/dts/rk3399-pinebook-pro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

backlight: backlight {
compatible = "pwm-backlight";
enable-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
enable-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
pwms = <&pwm0 0 740740 0>;
brightness-levels = <
0 1 2 3 4 5 6 7
Expand Down Expand Up @@ -74,7 +74,7 @@
* - SDIO_RESET_L_WL_REG_ON
* - PDN (power down when low)
*/
reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; // TODO?
};

vcc1v8_s0: vcc1v8-s0 {
Expand Down Expand Up @@ -115,7 +115,7 @@

vcc5v0_host: vcc5v0-host-regulator {
compatible = "regulator-fixed";
gpio = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>;
gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&host_vbus_drv>;
regulator-name = "vcc5v0_host";
Expand All @@ -124,7 +124,7 @@
vcc5v0_usb3_host: vcc5v0-usb3-host-regulator {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&host_usb3_drv>;
regulator-name = "vcc5v0_usb3_host";
Expand Down Expand Up @@ -393,17 +393,17 @@

pmic {
pmic_int_l: pmic-int-l {
rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
};
};

usb2 {
host_vbus_drv: host-vbus-drv {
rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
};

host_usb3_drv: host-usb3-drv {
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
Expand Down
12 changes: 6 additions & 6 deletions board/rockchip/pinebook_pro_rk3399/pinebook-pro-rk3399.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ DECLARE_GLOBAL_DATA_PTR;
#define RK3399_CPUID_OFF 0x7
#define RK3399_CPUID_LEN 0x10

static int fix_usb2_vbus_pull_mode(void)
static int fix_lcd_backling_pull_mode(void)
{
#include <asm/arch/grf_rk3399.h>

#define GRF_BASE 0xff770000
#define PMU_GRF_BASE 0xff320000

// set pull of GPIO4_D2
struct rk3399_grf_regs * const grf = (void *)GRF_BASE;
rk_clrsetreg(&grf->gpio4_p[3], 3 << 4, 0 << 4);
// set pull of GPIO1_A0
struct rk3399_pmugrf_regs * const pmugrf = (void *)PMU_GRF_BASE;
rk_clrsetreg(&pmugrf->gpio1_p[0], 3 << (2 * 0), 0 << (2 * 0));
return 0;
}

Expand Down Expand Up @@ -62,7 +62,7 @@ int board_init(void)
debug("%s: Cannot enable boot on regulator\n", __func__);
}

fix_usb2_vbus_pull_mode();
fix_lcd_backling_pull_mode();

out:
return 0;
Expand Down

0 comments on commit a6ade94

Please sign in to comment.