[U-Boot] [PATCH v2] Add single register pin controller driver
Masahiro Yamada
yamada.masahiro at socionext.com
Wed Feb 8 03:02:59 UTC 2017
Hi.
2017-02-07 22:30 GMT+09:00 Felix Brack <fb at ltec.ch>:
> +
> +static int single_set_state_simple(struct udevice *dev,
> + struct udevice *periph)
> +{
> + const void *fdt = gd->fdt_blob;
> + const struct single_fdt_pin_cfg *prop;
> + int len;
> +
> + prop = fdt_getprop(fdt, periph->of_offset, "pinctrl-single,pins", &len);
This seems wrong to me.
The "periph" is a peripheral device (like UART, eMMC, USB, etc.).
So, you are parsing the "pinctrl-single,pins" property
in the peripheral device, like
uart: uart {
pinctrl-single,pins = <
.....
>;
};
In pinctrl, peripheral nodes should have a phandle to a child of the
pinctrl device.
As you see Linux, the DT should look like this:
uart: uart {
pinctrl-0 = <&uart_pins>;
};
pinctrl {
uart_pins: uart_pins {
pinctrl-single,pins = <
....
>;
};
};
--
Best Regards
Masahiro Yamada
More information about the U-Boot
mailing list