[U-Boot] [PATCH 5/5] sunxi: add support for Pinebook

Maxime Ripard maxime.ripard at bootlin.com
Mon Oct 1 10:00:38 UTC 2018


On Mon, Oct 01, 2018 at 05:37:58PM +0800, Icenowy Zheng wrote:
> >>  dtb-$(CONFIG_MACH_SUN9I) += \
> >>  	sun9i-a80-optimus.dtb \
> >>  	sun9i-a80-cubieboard4.dtb \
> >> diff --git a/arch/arm/dts/sun50i-a64-pinebook.dts
> >b/arch/arm/dts/sun50i-a64-pinebook.dts
> >> new file mode 100644
> >> index 0000000000..48bee4cc7f
> >> --- /dev/null
> >> +++ b/arch/arm/dts/sun50i-a64-pinebook.dts
> >> @@ -0,0 +1,99 @@
> >> +/*
> >> + * Copyright (c) 2016 ARM Ltd.
> >> + *
> >> + * This file is dual-licensed: you can use it either under the terms
> >> + * of the GPL or the X11 license, at your option. Note that this
> >dual
> >> + * licensing only applies to this file, and not this project as a
> >> + * whole.
> >> + *
> >> + *  a) This library is free software; you can redistribute it and/or
> >> + *     modify it under the terms of the GNU General Public License
> >as
> >> + *     published by the Free Software Foundation; either version 2
> >of the
> >> + *     License, or (at your option) any later version.
> >> + *
> >> + *     This library is distributed in the hope that it will be
> >useful,
> >> + *     but WITHOUT ANY WARRANTY; without even the implied warranty
> >of
> >> + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> >> + *     GNU General Public License for more details.
> >> + *
> >> + * Or, alternatively,
> >> + *
> >> + *  b) Permission is hereby granted, free of charge, to any person
> >> + *     obtaining a copy of this software and associated
> >documentation
> >> + *     files (the "Software"), to deal in the Software without
> >> + *     restriction, including without limitation the rights to use,
> >> + *     copy, modify, merge, publish, distribute, sublicense, and/or
> >> + *     sell copies of the Software, and to permit persons to whom
> >the
> >> + *     Software is furnished to do so, subject to the following
> >> + *     conditions:
> >> + *
> >> + *     The above copyright notice and this permission notice shall
> >be
> >> + *     included in all copies or substantial portions of the
> >Software.
> >> + *
> >> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
> >KIND,
> >> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
> >WARRANTIES
> >> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> >> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> >> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> >> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> >> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> >> + *     OTHER DEALINGS IN THE SOFTWARE.
> >> + */
> >> +
> >> +/dts-v1/;
> >> +
> >> +#include <dt-bindings/pwm/pwm.h>
> >> +#include "sun50i-a64-pine64.dts"
> >> +
> >> +/ {
> >> +	model = "Pinebook";
> >> +	compatible = "pine64,pinebook", "allwinner,sun50i-a64";
> >> +
> >> +	aliases {
> >> +		serial0 = &uart0;
> >> +		i2c0 = "/i2c at 1f02400";
> >> +	};
> >> +
> >> +	vdd_bl: regulator at 0 {
> >> +		compatible = "regulator-fixed";
> >> +		regulator-name = "bl-3v3";
> >> +		regulator-min-microvolt = <3300000>;
> >> +		regulator-max-microvolt = <3300000>;
> >> +		gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
> >> +		enable-active-high;
> >> +	};
> >> +
> >> +
> >> +	backlight: backlight {
> >> +		compatible = "pwm-backlight";
> >> +		pwms = <&pwm 0 50000 0>;
> >> +		brightness-levels = <0 10 20 30 40 50 60 70 100>;
> >> +		default-brightness-level = <3>;
> >> +		enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
> >> +		power-supply = <&vdd_bl>;
> >> +	};
> >> +
> >> +	chosen {
> >> +		stdout-path = "serial0:115200n8";
> >> +	};
> >> +
> >> +	memory {
> >> +		reg = <0x40000000 0x40000000>;
> >> +	};
> >> +};
> >> +
> >> +&pwm {
> >> +	status = "okay";
> >> +};
> >> +
> >> +&r_i2c {
> >> +	pinctrl-names = "default";
> >> +	pinctrl-0 = <&r_i2c_pins_a>;
> >> +	status = "okay";
> >> +	anx6345: edp-bridge at 38 {
> >> +		compatible = "analogix,anx6345";
> >> +		reg = <0x38>;
> >> +		reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
> >> +		status = "okay";
> >> +	};
> >> +};
> >
> >I'm not sure why that DT is that different from the one we have in
> >Linux. Ideally, they should be identical.
> 
> Linux one has no ANX6345 yet, so they're not identical.

Right, but it's far from being the only difference.

Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181001/a6a3b6e2/attachment.sig>


More information about the U-Boot mailing list