]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3399-pinephone-pro: Sync DT from v6.8 and update defconfig
authorJonas Karlman <jonas@kwiboo.se>
Wed, 1 May 2024 16:22:38 +0000 (16:22 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Tue, 7 May 2024 07:56:09 +0000 (15:56 +0800)
Sync rk3399-pinephone-pro device tree from Linux kernel v6.8.

Add SPI flash related node and options to support boot from SPI flash.

Remove REGULATOR_PWM=y, board does not use pwm-regulator compatible.

Add SYS_NS16550_MEM32=y to use readl/writel for serial console.

Remove SPL_TINY_MEMSET=y to use full memset in SPL.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/dts/rk3399-pinephone-pro-u-boot.dtsi
arch/arm/dts/rk3399-pinephone-pro.dts
configs/pinephone-pro-rk3399_defconfig

index dcfcec4f30725eab9d9332e982bb6cd16e527c6a..037cec10ce363df5aece1533928e86e90e7b5d83 100644 (file)
 &sdmmc {
        max-frequency = <20000000>;
 };
+
+&spi1 {
+       status = "okay";
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               bootph-pre-ram;
+               bootph-some-ram;
+               spi-max-frequency = <10000000>;
+       };
+};
index 04403a76238b83358957c00663d314074687c466..61f3fec5a8b1d60a6707504d2cf971a392bf19e9 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/input/gpio-keys.h>
 #include <dt-bindings/input/linux-event-codes.h>
 #include "rk3399.dtsi"
 #include "rk3399-opp.dtsi"
                stdout-path = "serial2:115200n8";
        };
 
+       adc-keys {
+               compatible = "adc-keys";
+               io-channels = <&saradc 1>;
+               io-channel-names = "buttons";
+               keyup-threshold-microvolt = <1600000>;
+               poll-interval = <100>;
+
+               button-up {
+                       label = "Volume Up";
+                       linux,code = <KEY_VOLUMEUP>;
+                       press-threshold-microvolt = <100000>;
+               };
+
+               button-down {
+                       label = "Volume Down";
+                       linux,code = <KEY_VOLUMEDOWN>;
+                       press-threshold-microvolt = <600000>;
+               };
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm0 0 50000 0>;
+       };
+
        gpio-keys {
                compatible = "gpio-keys";
                pinctrl-names = "default";
                /* WL_REG_ON on module */
                reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
        };
+
+       /* MIPI DSI panel 1.8v supply */
+       vcc1v8_lcd: vcc1v8-lcd {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               regulator-name = "vcc1v8_lcd";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               vin-supply = <&vcc3v3_sys>;
+               gpio = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+       };
+
+       /* MIPI DSI panel 2.8v supply */
+       vcc2v8_lcd: vcc2v8-lcd {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               regulator-name = "vcc2v8_lcd";
+               regulator-min-microvolt = <2800000>;
+               regulator-max-microvolt = <2800000>;
+               vin-supply = <&vcc3v3_sys>;
+               gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+       };
+};
+
+&cpu_alert0 {
+       temperature = <65000>;
+};
+&cpu_alert1 {
+       temperature = <68000>;
 };
 
 &cpu_l0 {
        status = "okay";
 };
 
+&gpu {
+       mali-supply = <&vdd_gpu>;
+       status = "okay";
+};
+
 &i2c0 {
        clock-frequency = <400000>;
        i2c-scl-rising-time-ns = <168>;
        };
 };
 
+&i2c3 {
+       i2c-scl-rising-time-ns = <450>;
+       i2c-scl-falling-time-ns = <15>;
+       status = "okay";
+
+       touchscreen@14 {
+               compatible = "goodix,gt1158";
+               reg = <0x14>;
+               interrupt-parent = <&gpio3>;
+               interrupts = <RK_PB5 IRQ_TYPE_EDGE_RISING>;
+               irq-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
+               reset-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>;
+               AVDD28-supply = <&vcc3v0_touch>;
+               VDDIO-supply = <&vcc3v0_touch>;
+               touchscreen-size-x = <720>;
+               touchscreen-size-y = <1440>;
+       };
+};
+
 &cluster0_opp {
        opp04 {
                status = "disabled";
        status = "okay";
 };
 
+&mipi_dsi {
+       status = "okay";
+       clock-master;
+
+       ports {
+               mipi_out: port@1 {
+                       #address-cells = <0>;
+                       #size-cells = <0>;
+                       reg = <1>;
+
+                       mipi_out_panel: endpoint {
+                               remote-endpoint = <&mipi_in_panel>;
+                       };
+               };
+       };
+
+       panel@0 {
+               compatible = "hannstar,hsd060bhw4";
+               reg = <0>;
+               backlight = <&backlight>;
+               reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>;
+               vcc-supply = <&vcc2v8_lcd>;
+               iovcc-supply = <&vcc1v8_lcd>;
+               pinctrl-names = "default";
+
+               port {
+                       mipi_in_panel: endpoint {
+                               remote-endpoint = <&mipi_out_panel>;
+                       };
+               };
+       };
+};
+
 &pmu_io_domains {
        pmu1830-supply = <&vcc_1v8>;
        status = "okay";
        status = "okay";
 };
 
+&pwm0 {
+       status = "okay";
+};
+
+&saradc {
+       vref-supply = <&vcca1v8_s3>;
+       status = "okay";
+};
+
 &sdmmc {
        bus-width = <4>;
        cap-sd-highspeed;
 &uart2 {
        status = "okay";
 };
+
+&vopb {
+       status = "okay";
+       assigned-clocks = <&cru DCLK_VOP0_DIV>, <&cru DCLK_VOP0>,
+                         <&cru ACLK_VOP0>, <&cru HCLK_VOP0>;
+       assigned-clock-rates = <0>, <0>, <400000000>, <100000000>;
+       assigned-clock-parents = <&cru PLL_GPLL>, <&cru DCLK_VOP0_DIV>;
+};
+
+&vopb_mmu {
+       status = "okay";
+};
+
+&vopl {
+       status = "okay";
+       assigned-clocks = <&cru DCLK_VOP1_DIV>, <&cru DCLK_VOP1>,
+                         <&cru ACLK_VOP1>, <&cru HCLK_VOP1>;
+       assigned-clock-rates = <0>, <0>, <400000000>, <100000000>;
+       assigned-clock-parents = <&cru PLL_GPLL>, <&cru DCLK_VOP1_DIV>;
+};
+
+&vopl_mmu {
+       status = "okay";
+};
index c36898364b5da0f68c189c9caf2846b689864ed3..1bb7b35a255cceef1c0fa49ca176b750b1df9837 100644 (file)
@@ -3,7 +3,7 @@ CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_COUNTER_FREQUENCY=24000000
 CONFIG_ARCH_ROCKCHIP=y
 CONFIG_NR_DRAM_BANKS=1
-CONFIG_SF_DEFAULT_SPEED=20000000
+CONFIG_SF_DEFAULT_SPEED=10000000
 CONFIG_ENV_SIZE=0x8000
 CONFIG_ENV_OFFSET=0x3F8000
 CONFIG_DEFAULT_DEVICE_TREE="rk3399-pinephone-pro"
@@ -33,7 +33,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_PCI=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TIME=y
@@ -54,18 +53,20 @@ CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_ROCKCHIP=y
 CONFIG_SF_DEFAULT_BUS=1
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
+CONFIG_SPI_FLASH_SILICONKAISER=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PHY_ROCKCHIP_INNO_USB2=y
 CONFIG_PHY_ROCKCHIP_TYPEC=y
 CONFIG_DM_PMIC_FAN53555=y
 CONFIG_PMIC_RK8XX=y
-CONFIG_REGULATOR_PWM=y
 CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM_ROCKCHIP_LPDDR4=y
 CONFIG_BAUDRATE=1500000
 CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_SYS_NS16550_MEM32=y
 CONFIG_ROCKCHIP_SPI=y
 CONFIG_SYSRESET=y
 CONFIG_USB=y
@@ -85,5 +86,4 @@ CONFIG_VIDEO=y
 CONFIG_DISPLAY=y
 CONFIG_VIDEO_ROCKCHIP=y
 CONFIG_DISPLAY_ROCKCHIP_EDP=y
-CONFIG_SPL_TINY_MEMSET=y
 CONFIG_ERRNO_STR=y