Submit upstream changes made while porting a customer board to mainline
Subsystems (5)
v5 cover Submit upstream changes made while porting a customer board to mainline
Those changes are intended to easy the process of using U-Boot mainline with rv1108 based boards.
Please give them a good review and if possible, merge them as they are in use for some time on our custom tree and working fine.
Changes in v5:
- applied changes sent by Vicent Chi
Changes in v4:
- revert a wrong removal of devices
- split out dts changes
- new patch
Changes in v3:
- rework commit log
- rework commit log
- rework commit log
Changes in v2:
- new patch
- split bounce buffer change on a new patch
Otavio Salvador (6):
ARM: rockchip: rv1108: Sync clock with vendor tree
ARM: rockchip: rv1108: Enable BOUNCE_BUFFER
ARM: dts: rockchip: Add rv1108 eMMC pinctrl
ARM: rockchip: rv1108: Add a board_usb_init for USB OTG
ARM: dts: rockchip: Add rv1108 USB OTG pinctrl
ARM: rockchip: rv1108: Add support for default distro_bootcmd
arch/arm/dts/rv1108.dtsi | 74 ++- arch/arm/include/asm/arch-rockchip/clock.h | 6 + .../include/asm/arch-rockchip/cru_rv1108.h | 144 +++++- arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/rv1108-board.c | 81 +++ drivers/clk/rockchip/clk_rv1108.c | 475 +++++++++++++++++- include/configs/evb_rv1108.h | 3 + include/configs/rv1108_common.h | 18 + include/dt-bindings/clock/rv1108-cru.h | 137 ++++- 9 files changed, 903 insertions(+), 36 deletions(-) create mode 100644 arch/arm/mach-rockchip/rv1108-board.c
Signature · 1 line
2.19.2
PATCH v5 1/6 ARM: rockchip: rv1108: Sync clock with vendor tree
Make adjustments to the rv1108 clock driver in order to align it with the internal Rockchip version.
---
Changes in v5:
- applied changes sent by Vicent Chi
Changes in v4:
- revert a wrong removal of devices
Changes in v3: None
Changes in v2: None
arch/arm/include/asm/arch-rockchip/clock.h | 6 + .../include/asm/arch-rockchip/cru_rv1108.h | 144 +++++- drivers/clk/rockchip/clk_rv1108.c | 475 +++++++++++++++++- include/dt-bindings/clock/rv1108-cru.h | 137 ++++- 4 files changed, 729 insertions(+), 33 deletions(-)
arch/arm/include/asm/arch-rockchip/clock.h +6 -0
@@ -43,6 +43,12 @@ struct sysreset_reg {unsigned int glb_srst_snd_value; }; +struct softreset_reg { +void __iomem *base; +unsigned int sf_reset_offset; +unsigned int sf_reset_num; +}; +/** * clk_get_divisor() - Calculate the required clock divisior *
arch/arm/include/asm/arch-rockchip/cru_rv1108.h +143 -1
178 lines not on this page · raw message
drivers/clk/rockchip/clk_rv1108.c +469 -6
548 lines not on this page · raw message
include/dt-bindings/clock/rv1108-cru.h +111 -26
214 lines not on this page · raw message
Signature · 1 line
2.19.2
PATCH v5 1/6 ARM: rockchip: rv1108: Sync clock with vendor tree
Quoted 12 lines
Make adjustments to the rv1108 clock driver in order to align it with the internal Rockchip version.
Signed-off-by Otavio Salvador <[email protected]>---
Changes in v5:
- applied changes sent by Vicent ChiChanges in v4:
- revert a wrong removal of devices
Quoted 9 lines
Changes in v3: None
Changes in v2: Nonearch/arm/include/asm/arch-rockchip/clock.h | 6 + .../include/asm/arch-rockchip/cru_rv1108.h | 144 +++++- drivers/clk/rockchip/clk_rv1108.c | 475 +++++++++++++++++- include/dt-bindings/clock/rv1108-cru.h | 137 ++++- 4 files changed, 729 insertions(+), 33 deletions(-)
PATCH v5 1/6 ARM: rockchip: rv1108: Sync clock with vendor tree
In reply to Otavio SalvadorQuoted 13 lines
Make adjustments to the rv1108 clock driver in order to align it with the internal Rockchip version.
Signed-off-by Otavio Salvador <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>---
Changes in v5:
- applied changes sent by Vicent ChiChanges in v4:
- revert a wrong removal of devices
Quoted 9 lines
Changes in v3: None
Changes in v2: Nonearch/arm/include/asm/arch-rockchip/clock.h | 6 + .../include/asm/arch-rockchip/cru_rv1108.h | 144 +++++- drivers/clk/rockchip/clk_rv1108.c | 475 +++++++++++++++++- include/dt-bindings/clock/rv1108-cru.h | 137 ++++- 4 files changed, 729 insertions(+), 33 deletions(-)
Applied to u-boot-rockchip, thanks!
PATCH v5 2/6 ARM: rockchip: rv1108: Enable BOUNCE_BUFFER
In reply to Otavio SalvadorIn order to be able to build the Rockchip eMMC driver on rv1108, the BOUNCE_BUFFER option needs to be selected. Select it like it is done on the other Rockchip SoC common files.
---
Changes in v5: None
Changes in v4: None
Changes in v3:
- rework commit log
Changes in v2:
- new patch
include/configs/rv1108_common.h | 3 +++ 1 file changed, 3 insertions(+)
include/configs/rv1108_common.h +3 -0
@@ -17,6 +17,9 @@#define CONFIG_SYS_TIMER_BASE 0x10350020#define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMER_BASE + 8) +/* MMC/SD IP block */ +#define CONFIG_BOUNCE_BUFFER +#define CONFIG_SYS_SDRAM_BASE 0x60000000#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0x100000)#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x2000000)
Signature · 1 line
2.19.2
PATCH v5 2/6 ARM: rockchip: rv1108: Enable BOUNCE_BUFFER
Quoted 13 lines
In order to be able to build the Rockchip eMMC driver on rv1108, the
BOUNCE_BUFFERoption needs to be selected. Select it like it is done on the other Rockchip SoC common files.Reviewed-by Andy Yan <[email protected]>Signed-off-by Otavio Salvador <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3:
- rework commit log
Quoted 6 lines
Changes in v2:
- new patchinclude/configs/rv1108_common.h | 3 +++ 1 file changed, 3 insertions(+)
PATCH v5 2/6 ARM: rockchip: rv1108: Enable BOUNCE_BUFFER
In reply to Otavio SalvadorQuoted 14 lines
In order to be able to build the Rockchip eMMC driver on rv1108, the
BOUNCE_BUFFERoption needs to be selected. Select it like it is done on the other Rockchip SoC common files.Reviewed-by Andy Yan <[email protected]>Signed-off-by Otavio Salvador <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3:
- rework commit log
Quoted 6 lines
Changes in v2:
- new patchinclude/configs/rv1108_common.h | 3 +++ 1 file changed, 3 insertions(+)
Applied to u-boot-rockchip, thanks!
PATCH v5 3/6 ARM: dts: rockchip: Add rv1108 eMMC pinctrl
In reply to Otavio SalvadorThis adds the pinctrl handles to enable the use of eMMC on custom boards (as minievk) and makes it easier for later addition.
---
Changes in v5: None
Changes in v4: None
Changes in v3:
- rework commit log
Changes in v2:
- split bounce buffer change on a new patch
arch/arm/dts/rv1108.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
arch/arm/dts/rv1108.dtsi +29 -0
@@ -427,6 +427,35 @@ }; }; + emmc { + emmc_clk: emmc-clk { + rockchip,pins = <2 RK_PB6 RK_FUNC_1 &pcfg_pull_none_drv_8ma>; + }; + + emmc_cmd: emmc-cmd { + rockchip,pins = <2 RK_PB4 RK_FUNC_2 &pcfg_pull_up_drv_8ma>; + }; + + emmc_pwren: emmc-pwren { + rockchip,pins = <2 RK_PC2 RK_FUNC_2 &pcfg_pull_none>; + }; + + emmc_bus1: emmc-bus1 { + rockchip,pins = <2 RK_PA0 RK_FUNC_2 &pcfg_pull_up_drv_8ma>; + }; + + emmc_bus8: emmc-bus8 { + rockchip,pins = <2 RK_PA0 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, + <2 RK_PA1 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, + <2 RK_PA2 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, + <2 RK_PA3 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, + <2 RK_PA4 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, + <2 RK_PA5 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, + <2 RK_PA6 RK_FUNC_2 &pcfg_pull_up_drv_8ma>, + <2 RK_PA7 RK_FUNC_2 &pcfg_pull_up_drv_8ma>; + }; + }; + sdmmc { sdmmc_clk: sdmmc-clk { rockchip,pins = <3 RK_PC4 RK_FUNC_1 &pcfg_pull_none_drv_4ma>;
Signature · 1 line
2.19.2
PATCH v5 3/6 ARM: dts: rockchip: Add rv1108 eMMC pinctrl
Quoted 11 lines
This adds the pinctrl handles to enable the use of eMMC on custom boards (as minievk) and makes it easier for later addition.
Signed-off-by Otavio Salvador <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3:
- rework commit log
Quoted 6 lines
Changes in v2:
- split bounce buffer change on a new patcharch/arm/dts/rv1108.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
PATCH v5 3/6 ARM: dts: rockchip: Add rv1108 eMMC pinctrl
In reply to Otavio SalvadorQuoted 6 lines · Otavio Salvador
This adds the pinctrl handles to enable the use of eMMC on custom boards (as minievk) and makes it easier for later addition.
I forgot to remark that this is not really useful in U-Boot today, as the pinctrl driver does not parse the DTS...
PATCH v5 3/6 ARM: dts: rockchip: Add rv1108 eMMC pinctrl
In reply to Otavio SalvadorQuoted 12 lines
This adds the pinctrl handles to enable the use of eMMC on custom boards (as minievk) and makes it easier for later addition.
Signed-off-by Otavio Salvador <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>---
Changes in v5: None
Changes in v4: None
Changes in v3:
- rework commit log
Quoted 6 lines
Changes in v2:
- split bounce buffer change on a new patcharch/arm/dts/rv1108.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
Applied to u-boot-rockchip, thanks!
PATCH v5 4/6 ARM: rockchip: rv1108: Add a board_usb_init for USB OTG
In reply to Otavio SalvadorLike it is done for other Rockchip SoCs, introduce a board_usb_init() function so that USB OTG can be functional on rv1108 too.
---
Changes in v5: None
Changes in v4:
- split out dts changes
Changes in v3:
- rework commit log
Changes in v2: None
arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/rv1108-board.c | 81 +++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 arch/arm/mach-rockchip/rv1108-board.c
arch/arm/mach-rockchip/Makefile +1 -0
@@ -33,6 +33,7 @@ obj-$(CONFIG_ROCKCHIP_RK322X) += rk322x-board.o obj-$(CONFIG_ROCKCHIP_RK3288) += rk3288-board.o obj-$(CONFIG_ROCKCHIP_RK3036) += rk3036-board.o obj-$(CONFIG_ROCKCHIP_RK3399) += rk3399-board.o +obj-$(CONFIG_ROCKCHIP_RV1108) += rv1108-board.o endif obj-$(CONFIG_$(SPL_TPL_)RAM) += sdram_common.o
arch/arm/mach-rockchip/rv1108-board.c new file +81 -0
81 lines not on this page · raw message
Signature · 1 line
2.19.2
PATCH v5 4/6 ARM: rockchip: rv1108: Add a board_usb_init for USB OTG
Quoted 13 lines
Like it is done for other Rockchip SoCs, introduce a
board_usb_init()function so that USB OTG can be functional on rv1108 too.Signed-off-by Otavio Salvador <[email protected]>---
Changes in v5: None
Changes in v4:
- split out dts changesChanges in v3:
- rework commit log
Quoted 7 lines
Changes in v2: None
arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/rv1108-board.c | 81 +++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 arch/arm/mach-rockchip/rv1108-board.c
PATCH v5 4/6 ARM: rockchip: rv1108: Add a board_usb_init for USB OTG
In reply to Otavio SalvadorQuoted 14 lines
Like it is done for other Rockchip SoCs, introduce a
board_usb_init()function so that USB OTG can be functional on rv1108 too.Signed-off-by Otavio Salvador <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>---
Changes in v5: None
Changes in v4:
- split out dts changesChanges in v3:
- rework commit log
Quoted 7 lines
Changes in v2: None
arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/rv1108-board.c | 81 +++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 arch/arm/mach-rockchip/rv1108-board.c
Applied to u-boot-rockchip, thanks!
PATCH v5 5/6 ARM: dts: rockchip: Add rv1108 USB OTG pinctrl
In reply to Otavio SalvadorThis adds the definitions need to use the USB OTG in rv1108 board. This has been tested using USB Mass Storage to export and program a eMMC device.
---
Changes in v5: None
Changes in v4:
- new patch
Changes in v3: None
Changes in v2: None
arch/arm/dts/rv1108.dtsi | 45 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-)
arch/arm/dts/rv1108.dtsi +42 -3
@@ -121,8 +121,35 @@ }; grf: syscon at 10300000 { - compatible = "rockchip,rv1108-grf", "syscon"; + compatible = "rockchip,rv1108-grf", "syscon", "simple-mfd"; reg = <0x10300000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + + u2phy: usb2-phy at 100 { + compatible = "rockchip,rv1108-usb2phy"; + reg = <0x100 0x0c>; + clocks = <&cru SCLK_USBPHY>; + clock-names = "phyclk"; + #clock-cells = <0>; + clock-output-names = "usbphy"; + rockchip,usbgrf = <&usbgrf>; + status = "disabled"; + + u2phy_otg: otg-port { + interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "otg-mux"; + #phy-cells = <0>; + status = "disabled"; + }; + + u2phy_host: host-port { + interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "linestate"; + #phy-cells = <0>; + status = "disabled"; + }; + }; }; saradc: saradc at 1038c000 {
@@ -141,6 +168,11 @@ reg = <0x20060000 0x1000>; }; + usbgrf: syscon at 202a0000 { + compatible = "rockchip,rv1108-usbgrf", "syscon"; + reg = <0x202a0000 0x1000>; + }; + cru: clock-controller at 20200000 { compatible = "rockchip,rv1108-cru"; reg = <0x20200000 0x1000>;
@@ -200,12 +232,19 @@ }; usb20_otg: usb at 30180000 { - compatible = "rockchip,rv1108-usb", "rockchip,rk3288-usb", + compatible = "rockchip,rv1108-usb", "rockchip,rk3066-usb", "snps,dwc2"; reg = <0x30180000 0x40000>; interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>; - hnp-srp-disable; + clocks = <&cru HCLK_OTG>; + clock-names = "otg"; dr_mode = "otg"; + g-np-tx-fifo-size = <16>; + g-rx-fifo-size = <280>; + g-tx-fifo-size = <256 128 128 64 32 16>; + g-use-dma; + phys = <&u2phy_otg>; + phy-names = "usb2-phy"; status = "disabled"; };
Signature · 1 line
2.19.2
PATCH v5 5/6 ARM: dts: rockchip: Add rv1108 USB OTG pinctrl
Quoted 11 lines
This adds the definitions need to use the USB OTG in rv1108 board. This has been tested using USB Mass Storage to export and program a eMMC device.
Signed-off-by Otavio Salvador <[email protected]>---
Changes in v5: None
Changes in v4:
- new patch
Quoted 6 lines
Changes in v3: None
Changes in v2: Nonearch/arm/dts/rv1108.dtsi | 45 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-)
PATCH v5 5/6 ARM: dts: rockchip: Add rv1108 USB OTG pinctrl
In reply to Otavio SalvadorQuoted 12 lines
This adds the definitions need to use the USB OTG in rv1108 board. This has been tested using USB Mass Storage to export and program a eMMC device.
Signed-off-by Otavio Salvador <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>---
Changes in v5: None
Changes in v4:
- new patch
Quoted 6 lines
Changes in v3: None
Changes in v2: Nonearch/arm/dts/rv1108.dtsi | 45 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-)
Applied to u-boot-rockchip, thanks!
PATCH v5 6/6 ARM: rockchip: rv1108: Add support for default distro_bootcmd
In reply to Otavio SalvadorThis allow easier integration of RV1108 based boards on generic distributions and build systems.
To avoid behavior change, we make evb-rv1108 to use the existing environment as it boots from its SPI NOR.
---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
include/configs/evb_rv1108.h | 3 +++ include/configs/rv1108_common.h | 15 +++++++++++++++ 2 files changed, 18 insertions(+)
include/configs/evb_rv1108.h +3 -0
@@ -11,11 +11,14 @@/* * Default environment settings */ +#undef CONFIG_EXTRA_ENV_SETTINGS#define CONFIG_EXTRA_ENV_SETTINGS \ "netdev=eth0\0" \ "ipaddr=172.16.12.50\0" \ "serverip=172.16.12.69\0" \ "" + +#undef CONFIG_BOOTCOMMAND#define CONFIG_BOOTCOMMAND \ "sf probe;" \ "sf read 0x62000000 0x140800 0x500000;" \
include/configs/rv1108_common.h +15 -0
@@ -28,3 +28,18 @@#define CONFIG_USB_OHCI_NEW #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1#endif + +#ifndef CONFIG_SPL_BUILD +#define ENV_MEM_LAYOUT_SETTINGS \ + "scriptaddr=0x60000000\0" \ + "fdt_addr_r=0x61f00000\0" \ + "kernel_addr_r=0x62000000\0" \ + "ramdisk_addr_r=0x64000000\0" + +#include <config_distro_bootcmd.h> +#define CONFIG_EXTRA_ENV_SETTINGS \ + ENV_MEM_LAYOUT_SETTINGS \ + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ + "partitions=" PARTS_DEFAULT \ + BOOTENV +#endif
Signature · 1 line
2.19.2
PATCH v5 6/6 ARM: rockchip: rv1108: Add support for default distro_bootcmd
Quoted 9 lines
This allow easier integration of RV1108 based boards on generic distributions and build systems.
To avoid behavior change, we make evb-rv1108 to use the existing environment as it boots from its SPI NOR.
Signed-off-by Otavio Salvador <[email protected]>---
Quoted 9 lines
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: Noneinclude/configs/evb_rv1108.h | 3 +++ include/configs/rv1108_common.h | 15 +++++++++++++++ 2 files changed, 18 insertions(+)
PATCH v5 6/6 ARM: rockchip: rv1108: Add support for default distro_bootcmd
In reply to Otavio SalvadorQuoted 10 lines
This allow easier integration of RV1108 based boards on generic distributions and build systems.
To avoid behavior change, we make evb-rv1108 to use the existing environment as it boots from its SPI NOR.
Signed-off-by Otavio Salvador <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>---
Quoted 9 lines
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: Noneinclude/configs/evb_rv1108.h | 3 +++ include/configs/rv1108_common.h | 15 +++++++++++++++ 2 files changed, 18 insertions(+)
Applied to u-boot-rockchip, thanks!