Re: Re: [PATCH v1] ARM: Rockchip: Add rk3568 BananaPi R2 Pro board support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 10, 2022 at 04:22:22PM +0100, Frank Wunderlich wrote:
> 
> > Gesendet: Montag, 24. Januar 2022 um 09:55 Uhr
> > Von: "Sascha Hauer" <s.hauer@xxxxxxxxxxxxxx>
> 
> > I saw this device tree looks different from the one you sent for kernel
> > inclusion. This is not a problem now, but once the kernel dts is
> > upstream it will show up in dts/ in the barebox tree. We then usually
> > include the upstream dts from the barebox board dts, so that only the
> > barebox specific additions are in the barebox dts. Given that it would
> > be nice if you could minimize the differences now already, so that later
> > inclusion of the upstream dts becomes easier.
> 
> Hi,
> 
> after dts got merged to linux i used it to find differences and minimized them.
> 
> have not added io-domain as i don't know if they change in future and they are not needed in barebox.
> 
> needed to add tsadc+pinctrl and spi3 to rk3568*.dtsi as they are referenced in my linux board dts
> 
> can you look if the dts is now ok for upstreaming?
> 
> https://github.com/frank-w/barebox-r2pro/blob/r2pro/arch/arm/dts/rk3568-bpi-r2-pro.dts

Here's the diff for the two files. Most stuff looks ok, but some there
are a few things:

> --- rk3568-bpi-r2-pro.dts	2022-02-10 16:44:02.512408386 +0100
> +++ bb.dts	2022-02-10 16:44:41.880348199 +0100
> @@ -15,13 +15,29 @@
>  	compatible = "rockchip,rk3568-bpi-r2pro", "rockchip,rk3568";
>  
>  	aliases {
> -		ethernet0 = &gmac0;
> -		mmc0 = &sdmmc0;
> -		mmc1 = &sdhci;
> +		emmc = &sdhci;
> +		sd = &sdmmc0;
>  	};
>  
> -	chosen: chosen {
> +	chosen {
>  		stdout-path = "serial2:1500000n8";
> +
> +		environment-sd {
> +			compatible = "barebox,environment";
> +			device-path = &environment_sd;
> +			status = "disabled";
> +		};
> +
> +		environment-emmc {
> +			compatible = "barebox,environment";
> +			device-path = &environment_emmc;
> +			status = "disabled";
> +		};
> +	};
> +
> +	memory@a00000 {
> +		device_type = "memory";
> +		reg = <0x0 0x00a00000 0x0 0x7f600000>;
>  	};
>  
>  	leds {
> @@ -72,11 +88,42 @@
>  		regulator-max-microvolt = <5000000>;
>  		vin-supply = <&dc_12v>;
>  	};
> +
> +	vcc3v3_lcd0_n: vcc3v3-lcd0-n {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vcc3v3_lcd0_n";
> +		regulator-boot-on;
> +
> +		regulator-state-mem {
> +			regulator-off-in-suspend;
> +		};
> +	};
> +
> +	vcc3v3_lcd1_n: vcc3v3-lcd1-n {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vcc3v3_lcd1_n";
> +		regulator-boot-on;
> +
> +		regulator-state-mem {
> +			regulator-off-in-suspend;
> +		};
> +	};
> +
> +	vcc5v0_host: vcc5v0-host-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vcc5v0_host";
> +		enable-active-high;
> +		gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&vcc5v0_host_en>;
> +		regulator-always-on;
> +	};
>  };
>  
>  &gmac0 {
>  	assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
>  	assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
> +	assigned-clock-rates = <0>, <125000000>;
>  	clock_in_out = "input";
>  	phy-handle = <&rgmii_phy0>;
>  	phy-mode = "rgmii";
> @@ -86,10 +133,6 @@
>  		     &gmac0_rx_bus2
>  		     &gmac0_rgmii_clk
>  		     &gmac0_rgmii_bus>;
> -	snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
> -	snps,reset-active-low;
> -	/* Reset time is 20ms, 100ms for rtl8211f */
> -	snps,reset-delays-us = <0 20000 100000>;

Why is this removed?

>  	tx_delay = <0x3c>;
>  	rx_delay = <0x2f>;
>  	status = "okay";
> @@ -106,6 +149,11 @@
>  		#clock-cells = <1>;
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&pmic_int>;
> +
> +		clock-output-names = "rk808-clkout1", "rk808-clkout2";
> +		/* 1: rst regs (default in codes), 0: rst the pmic */
> +		pmic-reset-func = <0>;
> +
>  		rockchip,system-power-controller;
>  		vcc1-supply = <&vcc3v3_sys>;
>  		vcc2-supply = <&vcc3v3_sys>;
> @@ -118,6 +166,10 @@
>  		vcc9-supply = <&vcc3v3_sys>;
>  		wakeup-source;
>  
> +		pwrkey {
> +			status = "okay";
> +		};

This is unused in barebox, right? If so, please drop.

> +
>  		regulators {
>  			vdd_logic: DCDC_REG1 {
>  				regulator-name = "vdd_logic";
> @@ -337,19 +389,28 @@
>  			rockchip,pins =
>  				<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
>  		};
> +
> +		soc_slppin_gpio: soc_slppin_gpio {
> +			rockchip,pins =
> +				<0 RK_PA2 RK_FUNC_GPIO &pcfg_output_low>;
> +		};
> +
> +		soc_slppin_slp: soc_slppin_slp {
> +			rockchip,pins =
> +				<0 RK_PA2 1 &pcfg_pull_none>;
> +		};
> +
> +		soc_slppin_rst: soc_slppin_rst {
> +			rockchip,pins =
> +				<0 RK_PA2 2 &pcfg_pull_none>;
> +		};

These are unused.

>  	};
> -};
>  
> -&pmu_io_domains {
> -	pmuio1-supply = <&vcc3v3_pmu>;
> -	pmuio2-supply = <&vcc3v3_pmu>;
> -	vccio1-supply = <&vccio_acodec>;
> -	vccio3-supply = <&vccio_sd>;
> -	vccio4-supply = <&vcc_1v8>;
> -	vccio5-supply = <&vcc_3v3>;
> -	vccio6-supply = <&vcc_3v3>;
> -	vccio7-supply = <&vcc_3v3>;
> -	status = "okay";
> +	usb {
> +		vcc5v0_host_en: vcc5v0-host-en {
> +			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
>  };
>  
>  &pwm8 {
> @@ -404,22 +465,46 @@
>  	bus-width = <8>;
>  	max-frequency = <200000000>;
>  	non-removable;
> +	no-sd;
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
>  	status = "okay";
> +
> +	partitions {
> +		compatible = "fixed-partitions";
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +
> +		environment_emmc: partition@408000 {
> +			label = "barebox-environment";
> +			reg = <0x0 0x408000 0x0 0x8000>;
> +		};
> +	};
>  };
>  
>  &sdmmc0 {
>  	bus-width = <4>;
>  	cap-sd-highspeed;
> -	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;

Could be added to barebox dts as well.

>  	disable-wp;
> +	max-frequency = <150000000>;
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
>  	sd-uhs-sdr104;
> +	supports-sd;

Please drop. This is used nowhere.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux