nm-boards: Replace all devicetree paths with aliases
This is easier to maintain and should be compatible with any kernel version as long as the devicetree aliases are maintained. BugzID: 77112
This commit is contained in:
parent
4832ca022a
commit
7b4add1789
|
|
@ -1304,13 +1304,13 @@ static void ft_dio(void *blob)
|
||||||
ft_enable_node(blob, "/netbox_dio_2in_1out");
|
ft_enable_node(blob, "/netbox_dio_2in_1out");
|
||||||
|
|
||||||
/* OEM Linux gpios -> remove IOs not present */
|
/* OEM Linux gpios -> remove IOs not present */
|
||||||
ft_set_gpio_name(blob, "/ocp/interconnect@44c00000/segment@200000/target-module@7000/gpio@0", 27, ""); /* gpio0_27: IO_OUT1n */
|
ft_set_gpio_name(blob, "gpio0", 27, ""); /* gpio0_27: IO_OUT1n */
|
||||||
ft_set_gpio_name(blob, "/ocp/interconnect@48000000/segment@0/target-module@4c000/gpio@0", 14, ""); /* gpio1_14: IO_IN2 */
|
ft_set_gpio_name(blob, "gpio1", 14, ""); /* gpio1_14: IO_IN2 */
|
||||||
ft_set_gpio_name(blob, "/ocp/interconnect@48000000/segment@0/target-module@4c000/gpio@0", 15, ""); /* gpio1_15: IO_IN3 */
|
ft_set_gpio_name(blob, "gpio1", 15, ""); /* gpio1_15: IO_IN3 */
|
||||||
|
|
||||||
/* pmic_gpios: 5: IO_IN2_WAKE3n, 6: IO_IN2_WAKE3n */
|
/* pmic_gpios: 5: IO_IN2_WAKE3n, 6: IO_IN2_WAKE3n */
|
||||||
ft_set_gpio_name(blob, "/ocp/interconnect@44c00000/segment@200000/target-module@b000/i2c@0/da9063@58/gpio", 5, "");
|
ft_set_gpio_name(blob, "pmic_gpios", 5, "");
|
||||||
ft_set_gpio_name(blob, "/ocp/interconnect@44c00000/segment@200000/target-module@b000/i2c@0/da9063@58/gpio", 6, "");
|
ft_set_gpio_name(blob, "pmic_gpios", 6, "");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -1325,8 +1325,8 @@ static void ft_tty(void *blob)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* OEM Linux gpios -> remove IOs not present */
|
/* OEM Linux gpios -> remove IOs not present */
|
||||||
ft_set_gpio_name(blob, "/ocp/interconnect@44c00000/segment@200000/target-module@7000/gpio@0", 22, ""); /* gpio0_22: SEL_RS232_RS485n */
|
ft_set_gpio_name(blob, "gpio0", 22, ""); /* gpio0_22: SEL_RS232_RS485n */
|
||||||
ft_set_gpio_name(blob, "/ocp/interconnect@44c00000/segment@200000/target-module@7000/gpio@0", 23, ""); /* gpio0_23: RS485_TERM_ENn */
|
ft_set_gpio_name(blob, "gpio0", 23, ""); /* gpio0_23: RS485_TERM_ENn */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2123,7 +2123,7 @@ static void ft_user_interface(void *blob)
|
||||||
if (ui_hw_version == 1) {
|
if (ui_hw_version == 1) {
|
||||||
int node_offset;
|
int node_offset;
|
||||||
|
|
||||||
node_offset = fdt_path_offset(blob, "/ocp/interconnect@48000000/segment@0/target-module@2a000/i2c@0/pca9539@74/");
|
node_offset = fdt_path_offset(blob, "ui_v1");
|
||||||
if (node_offset != -1) {
|
if (node_offset != -1) {
|
||||||
fdt_setprop_string(blob, node_offset, "status", "okay");
|
fdt_setprop_string(blob, node_offset, "status", "okay");
|
||||||
}
|
}
|
||||||
|
|
@ -2148,7 +2148,7 @@ static void ft_user_interface(void *blob)
|
||||||
else if (ui_hw_version == 2) {
|
else if (ui_hw_version == 2) {
|
||||||
int node_offset;
|
int node_offset;
|
||||||
|
|
||||||
node_offset = fdt_path_offset(blob, "/ocp/interconnect@48000000/segment@0/target-module@2a000/i2c@0/pca9538@70/");
|
node_offset = fdt_path_offset(blob, "ui_v2");
|
||||||
if (node_offset != -1) {
|
if (node_offset != -1) {
|
||||||
fdt_setprop_string(blob, node_offset, "status", "okay");
|
fdt_setprop_string(blob, node_offset, "status", "okay");
|
||||||
}
|
}
|
||||||
|
|
@ -2206,13 +2206,13 @@ static void ft_eth(void *blob)
|
||||||
if (hw_ver == 1) {
|
if (hw_ver == 1) {
|
||||||
int node_offset;
|
int node_offset;
|
||||||
|
|
||||||
node_offset = fdt_path_offset(blob, "/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000/ethernet-phy@2/");
|
node_offset = fdt_path_offset(blob, "broadr1");
|
||||||
if (node_offset != -1) {
|
if (node_offset != -1) {
|
||||||
fdt_setprop_u32(blob, node_offset, "<reg>", 7);
|
fdt_setprop_u32(blob, node_offset, "<reg>", 7);
|
||||||
fdt_setprop_u32(blob, node_offset, "reg", 7);
|
fdt_setprop_u32(blob, node_offset, "reg", 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
node_offset = fdt_path_offset(blob, "/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000/ethernet-phy@2/ethernet-phy@3/");
|
node_offset = fdt_path_offset(blob, "broadr0");
|
||||||
if (node_offset != -1) {
|
if (node_offset != -1) {
|
||||||
fdt_setprop_u32(blob, node_offset, "<reg>", 6);
|
fdt_setprop_u32(blob, node_offset, "<reg>", 6);
|
||||||
fdt_setprop_u32(blob, node_offset, "reg", 6);
|
fdt_setprop_u32(blob, node_offset, "reg", 6);
|
||||||
|
|
|
||||||
|
|
@ -1330,10 +1330,10 @@ end: ;
|
||||||
static void ft_comio_gpios(void *blob)
|
static void ft_comio_gpios(void *blob)
|
||||||
{
|
{
|
||||||
/* gpio0_7: COM/IO relay output */
|
/* gpio0_7: COM/IO relay output */
|
||||||
ft_set_gpio_name(blob, "/ocp/interconnect@44c00000/segment@200000/target-module@7000/gpio@0", 7, "COMIO_OUT0");
|
ft_set_gpio_name(blob, "gpio0", 7, "COMIO_OUT0");
|
||||||
|
|
||||||
/* gpio1_8: COM/IO digital input */
|
/* gpio1_8: COM/IO digital input */
|
||||||
ft_set_gpio_name(blob, "/ocp/interconnect@48000000/segment@0/target-module@4c000/gpio@0", 8, "COMIO_IN0");
|
ft_set_gpio_name(blob, "gpio1", 8, "COMIO_IN0");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ft_shields(void* blob)
|
static void ft_shields(void* blob)
|
||||||
|
|
|
||||||
|
|
@ -1242,10 +1242,10 @@ end: ;
|
||||||
static void ft_comio_gpios(void *blob)
|
static void ft_comio_gpios(void *blob)
|
||||||
{
|
{
|
||||||
/* gpio0_7: COM/IO relay output */
|
/* gpio0_7: COM/IO relay output */
|
||||||
ft_set_gpio_name(blob, "/ocp/interconnect@44c00000/segment@200000/target-module@7000/gpio@0", 7, "COMIO_OUT0");
|
ft_set_gpio_name(blob, "gpio0", 7, "COMIO_OUT0");
|
||||||
|
|
||||||
/* gpio1_8: COM/IO digital input */
|
/* gpio1_8: COM/IO digital input */
|
||||||
ft_set_gpio_name(blob, "/ocp/interconnect@48000000/segment@0/target-module@4c000/gpio@0", 8, "COMIO_IN0");
|
ft_set_gpio_name(blob, "gpio1", 8, "COMIO_IN0");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ft_shields(void* blob)
|
static void ft_shields(void* blob)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue